Comments (18)
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.
@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.
If I do this, then I get a result.
from vue-table.
@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.
@jeroenherczeg Done. If something looks strange to you, please do not hesitate to let me know. Thanks again for reporting. :)
from vue-table.
`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.
@jeroenherczeg Can you please try again?
from vue-table.
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.
@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.
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.
@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.
@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.
@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.
@ratiw Still figuring things out myself - if I do find anything I can improve, I will contribute
from vue-table.
@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.
@midium @mozami Thanks for the update. :) I'll probably wait a little bit before closing this issue.
from vue-table.
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.
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)
- Search with a extra data. HOT 6
- problem with scroll HOT 1
- Demo does not work in chrome HOT 4
- Error compiling template!!!! HELP ME!!! HOT 6
- Row totals HOT 3
- Is this an expected behavior of field callback?
- Can't style my grid to fit the content or a specific column HOT 2
- How use it for laravel HOT 1
- cell class cb
- Is it possible to add/del row dynamically? HOT 1
- unable to filter dates HOT 3
- No Data Available HOT 1
- Can I apply paging on client side? HOT 2
- Loading table with pre settings like sorting and page
- The word prev is spelled with the word next by mistake
- Pagination data not being transpile by polyfill
- Can i add `data-xxx` attribute to table head field? HOT 1
- http-fetch not showing data
- how to make columns resizable?
- How to use Cursor-Pagination
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vue-table.