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

    How to use prev Page and nextPage?

    Help
    2
    8
    573
    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.
    • M
      marcelo.delta last edited by marcelo.delta

      How to use prevPage and nextPage?

      QTable API

      I’m not able to trigger the method

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

        @marcelo-delta would help if you produce a codepen and pls check the examples https://quasar.dev/vue-components/table#Introduction.

        1 Reply Last reply Reply Quote 0
        • M
          marcelo.delta last edited by marcelo.delta

          Hi @metalsadman .

          https://codepen.io/marcelodelta/pen/vqaQBv

          How to use ?

          https://imge.to/i/4k6qV

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

            @marcelo-delta assign your table a ref ie. q-table ref='mytable' this.$refs.mytable.prevPage() https://codepen.io/metalsadman/pen/YojRYb

            1 Reply Last reply Reply Quote 0
            • M
              marcelo.delta last edited by marcelo.delta

              q-table ref=‘tablehistory’

              methods: {
              this.$refs.tablehistory.prevPage(() => {
              …
              })
              }

              Does not work

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

                @marcelo-delta your method definition is wrong, prevPage / nextPage doesn’t take an argument.

                methods: {
                  yourMethod() {
                    this.$refs.tablehistory.prevPage()
                  }
                }
                
                1 Reply Last reply Reply Quote 0
                • M
                  marcelo.delta last edited by

                  How to use the prevpage and nextpage default events Qtable

                  https://imge.to/i/4A1ZC

                  1 Reply Last reply Reply Quote -1
                  • metalsadman
                    metalsadman last edited by metalsadman

                    @marcelo-delta what do you mean? other than clicking it, it does the same as invoking the methods in question. if you want to listen for event when page changes use @update:pagination, https://quasar.dev/vue-components/table#QTable-API -> events tab, or you could watch for changes in the pagination model that you passed on your q-table’s pagination props.

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