DataTable using a different data sources



  • Hi …

    I was very happy to see that Quasar got a DataTable , as this is a extremely useful component, but I like to use other sources that plain data in an array, an like to ask if it would be possible to make some kind of data store.

    This way we could support the current data array model, but also make things like paged RESTful called to deferment backends, but isolate data providing and rendering.

    Something like :

    class DataStore {
        query( args: Object, order: Array, limit:number, offset: number ) : es6_iterator
    
        getKeyName(): string
        remove( key )
        set( key, data ) 
        get( key ) : any
    }
    

    This model would of cause have a memory version that could be used by default, to make it simple to make simple things.

    I could also try to do this as a PR (if I can find a way to make it work), is this has any interest :-)


  • Admin

    @bl Hi. Due to Vue we have computed properties so you can retrieve data in any format you want then use a computed property to feed to DataTable component. This way data can come in any form or shape, as long you compute it to an array. Does this help you?



  • Thanks, this make sense as long as the data list is somewhat small ( < 100), but if you have lists that is very large (10K) and like to range load data (to keep memory load on both the client and the backend down) and therefor need to make the provider (database) do the sorting and filtering we need to do something else.

    That is why it could be nice with a data store interface, like the one suggested as we could model any data provider using something like this.

    Inspired by things like dstore.


  • Admin

    @druppy Yes you got a good point here. Will see about this.



  • Hey @rstoenescu

    do you have any ideas if, and when this feature would be available?
    Would be nice if it could work in charm with p.e. mongoose Paginate
    before quasar, i worked with vue material, there they have a solution which works perfectly with Rest Api



  • I think the 0.14 release will be the first thing to consider, and then some months with consolidation :-)

    It would be nice with an interface like the IndexedDB, but we also need some query handling and event insertion, and editable grids. What I am saying is, that this could be a potential large project in it self.

    But some inspiration from things like dgrid may be worth including :-)


Log in to reply
 

Looks like your connection to Quasar Framework was lost, please wait while we try to reconnect.