Comments (10)
@Async0x42 Just added http-data
and http-options
props in v1.1.1 this morning. I think it is what you're looking. :)
from vue-table.
Hey, yes I had noticed those changes, but on reading the documentation I think it sends that additional data to the server, correct?
I'd like to initialize a vue-table without it handling the Ajax call. I'll retrieve the data elsewhere, and pass the JSON object directly to vue-table, there is no api-url for me to construct the table with
from vue-table.
@Async0x42 I'm sorry, it was not designed to work that way. It needs to handle the AJAX call in order for sorting, filtering to work.
I'm a little bit curious about your use case. Would you care to explain a little more about your use case?
from vue-table.
Sure thing!
Without going into a ton of detail, there's issues with connectivity to the server so that requests can either be lightning fast, or delayed a couple seconds (however once connection is established, data of any size can be downloaded fairly quickly)
Because of this I'm downloading the entire list at once (for multiple data lists), and storing them as json objects; those objects are then passed to various components as required (currently, jQuery DataTables).
DataTables (and the other vue table component developed by someone else), allows you to perform sorting/filtering (and provide custom functions to process that), on a data object (and provide data as pre-loaded vs requiring an ajax call), instead of requiring you to send the request to the server.
General summary of the situation, if you have any more questions I'll be glad to answer them!
from vue-table.
@Async0x42 Thanks for the explanation. But how would you expect vuetable to help with your work, I mean how would you expect to use it? To replace DataTable or to use it with another section of your work?
If vuetable could accept JSON object, it will not be able to track the paginaton and sorting. Would that be ok? I'm still not sure whether your use case (specific to vuetable) is for data processing or displaying.
The reason I'm asking is because I'm making another component to accept normal Javascript object (or the one converted from JSON) to display data in table format like vuetable, but it will made no contact to the server. It just rely on the main Vue.js instance to send it the data. Therefore, no sorting involve. Like a table listing the detail of order items in an order form. But you can set action items for each row, detect click on any row/cell (like in vuetable).
from vue-table.
I was looking for a replacement for DataTables, but I wasn't expecting the full fledged package. Sorting/searching without server queries and optionally populating the data from json I think would be beneficial without needing a new component for it,
Can't the sorting and pagination just perform the calculations on the data object (which has all the list records), and then display however many results are configured to be displayed?
Right now I'm wrapping DataTables in a component, and then in a view I pass the columns and json data as props. Which is fine, but I was digging around trying to find a vue replacement for the table display.
from vue-table.
@Async0x42 From the beginning, vuetable
was made from the idea that it would need to interact with the server for sorting, filtering, and pagination. This is mainly because it would be more resource efficient. I'm sorry to say that it might not be suitable for your use case as it would certainly cause more problems for you at the moment. I don't know if it would be possible to support this idea of use case in the future, but I would certainly think about it. Thanks for checking it out anyway. :)
from vue-table.
No problem; now that I think about it more, specialized components like you're doing would probably be better in the long run anyways.
from vue-table.
Hey,
Nice plugin. But, it is quite restrictive to force the data to be loaded via ajax. Not all data needs to be loaded from a server.
It would be useful to allow setting the data to an already locally available array/object
from vue-table.
@ksidibe You can do that with Vuetable-2 in Data mode. See example here.
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.