No More Posting New Topics!

If you have a question or an issue, please start a thread in our Github Discussions Forum.
This forum is closed for new threads/ topics.

Navigation

    Quasar Framework

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search

    DataTable using a different data sources

    Framework
    4
    6
    2442
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • bl
      bl last edited by

      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 🙂

      rstoenescu 1 Reply Last reply Reply Quote 0
      • rstoenescu
        rstoenescu Admin @bl last edited by

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

        1 Reply Last reply Reply Quote 1
        • druppy
          druppy last edited by

          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.

          rstoenescu 1 Reply Last reply Reply Quote 1
          • rstoenescu
            rstoenescu Admin @druppy last edited by

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

            1 Reply Last reply Reply Quote 0
            • C
              chrschdev last edited by

              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

              1 Reply Last reply Reply Quote 0
              • bl
                bl last edited by bl

                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 🙂

                1 Reply Last reply Reply Quote 0
                • First post
                  Last post