Giter Club home page Giter Club logo

Comments (10)

ratiw avatar ratiw commented on May 24, 2024

@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.

Async0x42 avatar Async0x42 commented on May 24, 2024

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.

ratiw avatar ratiw commented on May 24, 2024

@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.

Async0x42 avatar Async0x42 commented on May 24, 2024

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.

ratiw avatar ratiw commented on May 24, 2024

@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.

Async0x42 avatar Async0x42 commented on May 24, 2024

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.

ratiw avatar ratiw commented on May 24, 2024

@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.

Async0x42 avatar Async0x42 commented on May 24, 2024

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.

ksidibe avatar ksidibe commented on May 24, 2024

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.

ratiw avatar ratiw commented on May 24, 2024

@ksidibe You can do that with Vuetable-2 in Data mode. See example here.

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.