Git Product home page Git Product logo

Comments (4)

ratiw avatar ratiw commented on September 7, 2024

@Jigsaw5279 That would be risky for memory management.

It is designed to help you keep track of the selected row(s) across the whole data set, so that you can decided to do whatever you want later (using those ids). So, it was a design choice for me to keep only the id that it would not cost too much in term of memory usage.

On one hand, if you are only interested in the selected row of the current page, the data should already be in the memory and you can access them via tableData prop.

On the other hand, if the selected rows are across multiple pages and when you decided to do something with them, I think those ids should be sent to be processed on the server side.

Personally, I believe that the client side should only work with the presentation/interaction with end user. Any other business logic should be handled on the server side. :)

from vue-table.

Jigsaw5279 avatar Jigsaw5279 commented on September 7, 2024

Yea, I kniw about the risks of memory leakage.. But I've made a component that'll display a dropdown of actions. And I wanted to make it aware of the data that is about to be transformed.

For example, I've got a table of aacounts, wich are either enabled or disabled. It makes no sense to activate the "Activate" option, if there are only active acccounts selected.
I did so using a callback that is passed the array of currently selected Items. But so far, the only thing I can do is see if the size is > 0 cause all it contains are IDs.

Maybe it would be nice to have an event that fires when the selection changes to give you all the items needed?

from vue-table.

ratiw avatar ratiw commented on September 7, 2024

@Jigsaw5279 Hmm, I don't quite see the picture. But does this one helps?

from vue-table.

Jigsaw5279 avatar Jigsaw5279 commented on September 7, 2024

I might get it to work that way, at least I hope so

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.