Giter VIP home page Giter VIP logo

Comments (12)

tsankuanglee avatar tsankuanglee commented on August 14, 2024 1

@ratiw and all,

I am curious about your decision on Vuetable being purely for the presentation (since you have edit buttons in your tutorials). I wonder whether I am using the wrong tool here. Consider this use case:

I have 1000 records and each page shows 50 records. The user clicks on row 505 to edit it, which will be on page 11. The user uses the pop-up to edit that record, and the javascript makes an API call to submit the data to the server.

I was hoping to make use of vue's two-way binding to reflect the new changes on the client side, but there doesn't seem to be a way to do that.

Do I have to read the whole 1000 records back from the server in order to reflect the new edit, and handle the pagination manually?

Am I missing something?

from vuetable-2.

ratiw avatar ratiw commented on August 14, 2024

@cpfarher Soon, Vuetable will be able to support limited use of data array instead of calling the api only.

This is mainly for certain use case where Vuetable can be used inside a form (e.g. a quotation) where it displays a list of quoted items. Therefore, it will not support features that required interaction with database backend via API like sorting, filtering, etc.

from vuetable-2.

cpfarher avatar cpfarher commented on August 14, 2024

Are there any approximation or idea now? I need it ASAP. I am thinking on implement a "fake" api throught a vue component .....
If you have any elaborated idea about the way of implement this feature, It might I can implement!
Thank you

from vuetable-2.

eybarta avatar eybarta commented on August 14, 2024

Thanks for your work!

I wanted to use your plugin in Meteor/Vue project..

What if I need to fetch the table data from a Vuex store, which already contains
the data from the database, why would I need an api call?

What if my data is fetched through a method.call to the server?

I guess my question is, is there any other way to fetch the data other than implementing a
RESTful API from the server? because I'm not sure how to even do that with Meteor..

thx!

from vuetable-2.

ratiw avatar ratiw commented on August 14, 2024

@eybarta The update will serve that purpose in a limited way.

Assigning/setting the data in this way will eliminate the need to contact the server directly, therefore the related functionalities assume to be done by the server will not work, e.g. sorting, filtering, and pagination.

from vuetable-2.

eybarta avatar eybarta commented on August 14, 2024

@ratiw Thanks for your response.

As a general rule, using Vuex, I try and levy all data flow (server/client) through vuex actions, so even if I was to sort/filter/paginate server-side, it would best be served to components as a computed getter from my Vuex store (client side)...

I'm not sure I understand why a datatable plugin needs to be opinionated regarding the source of data it uses..?

good to hear of an update ;)

from vuetable-2.

ratiw avatar ratiw commented on August 14, 2024

@eybarta

Vuetable is actually opinionated from the beginning toward the interaction with the server side.

This is purely based on my experience. Processing the data on the client side would work just fine if the number of records is just a few hundreds or a few thousands. When the data grows larger and larger, this becomes impossible in terms of memory usage and user interaction.

By limiting Vuetable to be the presentation layer that works with the data expert (the database server via API) on the server side, this reduces the complexity a lot and becomes much more scale-able as you only deal with a little chunk of data at a time. The database server can also perform much more complex query and other things that it can do best instead of dumping loads of data to be processed on the client side.

I hope I can find time to finish this update and allow you guys to play with it. And hopefully that you guys can help improve it to some levels that would benefit the others who might have a need for it as well.

from vuetable-2.

clemsontiger avatar clemsontiger commented on August 14, 2024

How is this going? I'm also not quite clear if you will be implementing a way to allow pagination/sorting/filtering on the client side or not with this.

I'm still looking at using your vue table but we'll have plenty of scenarios where our users will only be managing up to a couple hundred records at a time, probably a lot less. being able to to paginate, filter, sort on the client side only for this limited record set in these scenarios would be more efficient than constantly hitting the server for this, correct? I understand why you'd definitely want it to hit the server when dealing with a much larger number of records, though.

Also, I apologize for my many recent questions/posts. Your vuetable is really great, and I'm wanting to potentially use it as our base where I work for our data grids, so just trying to vet what is doable and what is not with your vue table.

from vuetable-2.

cristijora avatar cristijora commented on August 14, 2024

The values should update because they are references. Can you post an example ? In the worst case you can trigger a refresh after your data is saved. The table refresh will query data based on the current pagination info (page number, items per page etc)

from vuetable-2.

tsankuanglee avatar tsankuanglee commented on August 14, 2024

Thanks for pointing out the pagination info part. @cristijora That helps. Still, I'd rather not having to re-load from the server if possible.

The values should update because they are references.

How do I access these references? Does vuetable-2 provide a public access function? This may be the thing I have missed.

from vuetable-2.

vinayakkulkarni avatar vinayakkulkarni commented on August 14, 2024

is there a direct way to manipulate the tableData variable in yourcustom.vue ?

from vuetable-2.

fabiorizzello avatar fabiorizzello commented on August 14, 2024

@vinayakkulkarni You can use $refs. But it should be just a temporary workaround

from vuetable-2.

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.