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

    QTable Height and Scroll?

    Help
    2
    4
    1842
    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.
    • K
      kerbo last edited by

      QTables only show 5 rows of data by default.

      How can I change the height of table to show more rows?

      If I dynamically add more than 5 rows to the table, I expected a scroll bar to display but it doesn’t. How can I get a scroll bar to appear?

      1 Reply Last reply Reply Quote 0
      • K
        kerbo last edited by

        I was able to change the table height by setting the pagination property “rowsPerPage” to a number bigger than 5. Now that my table is at the height I want, I still want to the scroll bars to appear if the number of rows is greater than “rowsPerPage”.

        I appreciate QTable has lots of pagination stuff to handle fetching data from a server but QTable should not be so tightly bound to this feature.

        K 1 Reply Last reply Reply Quote 0
        • K
          kerbo @kerbo last edited by

          I found in another post the following css sets the table height and adds the scroll.

          .table-class {
            display: block;
            height: 500px;
          }
          

          It seems you also have to include the pagination property to get it to work.

          Sadly, the scroll bar scrolls the entire table including the header <sigh>.

          M 1 Reply Last reply Reply Quote 0
          • M
            murrah @kerbo last edited by

            @kerbo This works:
            https://forum.quasar-framework.org/topic/5284/q-table-height-virtual-scroll-and-sticky-headers/2
            🙂

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