Giter Club home page Giter Club logo

Comments (18)

midium avatar midium commented on May 29, 2024 1

Would be nice if the component is able to understand if the data passed is with pagination or not, but maybe this is better to be kept as developer responsibility

from vue-table.

ratiw avatar ratiw commented on May 29, 2024 1

@midium In the next release, a warning will be dump to console if it cannot find the given pagination-path in the returned JSON.

from vue-table.

jeroenherczeg avatar jeroenherczeg commented on May 29, 2024

screen shot 2016-04-27 at 13 23 13

If I do this, then I get a result.

from vue-table.

ratiw avatar ratiw commented on May 29, 2024

@jeroenherczeg You modification is correct. I just wonder why I never got the error and made me overlook it. Will fix it tonight though. Many thanks for reporting.

from vue-table.

ratiw avatar ratiw commented on May 29, 2024

@jeroenherczeg Done. If something looks strange to you, please do not hesitate to let me know. Thanks again for reporting. :)

from vue-table.

jeroenherczeg avatar jeroenherczeg commented on May 29, 2024

`npm install
npm ERR! Darwin 15.4.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install"
npm ERR! node v5.4.1
npm ERR! npm v3.7.3

npm ERR! No compatible version found: vuetable@^1.0.10
npm ERR! Valid install targets:
npm ERR! 1.0.9
npm ERR!
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR! https://github.com/npm/npm/issues`

I think you have to bump the version number on the npm site?
I am also new to npm packages (:

from vue-table.

ratiw avatar ratiw commented on May 29, 2024

@jeroenherczeg Can you please try again?

from vue-table.

jeroenherczeg avatar jeroenherczeg commented on May 29, 2024

success! [email protected]
but i still get an error

TypeError: Cannot read property 'pagination' of null(…)

in de getObjectValue function

if (typeof obj[key] != 'undefined' && obj[key] !== null) {

Maybe I am doing something wrong, if it works for you?

from vue-table.

ratiw avatar ratiw commented on May 29, 2024

@jeroenherczeg Can you please put your code on gist or somewhere that I can have a look if you don't mind?

from vue-table.

midium avatar midium commented on May 29, 2024

I'm facing same issue. Anyway I also have problems with the data returned by my Laravel API call. Basically the table render with just written "No relevant data" but the function called return actually all the information required as json so I can't understand why it is not working.

from vue-table.

ratiw avatar ratiw commented on May 29, 2024

@midium The only problem I can think of is there might be some problem in mapping the pagination section of your JSON data structure to vuetable. Can you please show me your JSON data structure and <vuetable> tag that you use?

from vue-table.

mozami avatar mozami commented on May 29, 2024

@midium @jeroenherczeg Try adding pagination-path="" to your <vuetable> tag:

<vuetable
    api-url="/api/users"
    :fields="columnsToShow"
    :sort-order="sortOrder"
    :pagination-info-template="paginationInfoTemplate"
    pagination-path=""
></vuetable>

I've just started playing with this component, ran into the same issue and that fixed it for me.

@ratiw - thanks for sharing this, looks like a great lightweight and useful component!

from vue-table.

ratiw avatar ratiw commented on May 29, 2024

@midium @jeroenherczeg Please see more info on this section of Wiki Data Format.

@mozami - Glad you find it useful. But I think the documentation I put on Wiki pages might not be good enough. I'm really not a good writer. Thanks for helping out anyway. :)

from vue-table.

mozami avatar mozami commented on May 29, 2024

@ratiw Still figuring things out myself - if I do find anything I can improve, I will contribute

from vue-table.

midium avatar midium commented on May 29, 2024

@mozami I've tried your solution and at least now I see displaying 0 of 0 but anyway the data returned by the call to laravel is not empty, going to check better the data structure and in case will post it here.

Edit
sorry guys, it is just that I am an idiot. Basically the call made in laravel was not with paginate but with get. Once changed into paginate, the information returned are now correct and the component render properly. Thanks.

from vue-table.

ratiw avatar ratiw commented on May 29, 2024

@midium @mozami Thanks for the update. :) I'll probably wait a little bit before closing this issue.

from vue-table.

SeoRoman avatar SeoRoman commented on May 29, 2024

just wanted to say thanks for this issue / resolve with pagination-path="" I was struggling because I really wanted to use this with Laravel and could not figure out why it wasn't working... it's great though! thanks!

from vue-table.

vernard avatar vernard commented on May 29, 2024

This also helped me. Most applications would return JSON rows of the records without having to provide info on pagination (pagination happens on client side in this case). But this module uses server side pagination.

I believe this should be noted in README.md. Most developers assume that the api-url will return the data rows without having pagination information (on the response).

from vue-table.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.