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 create an element like Drawer: take all available height and scroll for the content that don't fit in.

    Help
    2
    5
    642
    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.
    • S
      SharpBCD last edited by SharpBCD

      I’m looking to create something similar with the Drawer: take all height and scroll for the rest of content (if required) A list of cards will fill it and for what is overflow a scroll will do.
      Sounds simple but for some reasons I can’t get it done. I have attached a picture with an example of UX I took from Pinterest.
      Any suggestions? Somehow I feel it is simple and I just miss some basic classes or something like that. I played with row, col + full-height, scroll, fit, but no result.

      0_1549747503676_ex1.jpg

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

        Maybe use QScrollArea…

        S 1 Reply Last reply Reply Quote 0
        • S
          SharpBCD @Hawkeye64 last edited by

          @hawkeye64 Thanks for suggestion. I did not find QScrollArea in v1 but I verify it on the v0.17.
          Here is part of the code from docs at: https://quasar-framework.org/components/scroll-area.html
          <q-scroll-area
          style=“height: 200px”
          […]

          And the magic stopped at that height element. What I did not manage to do was to find an elegant method to make the element fit the available space on the screen (on y) and stay at that size. Scroll when the content is higher.
          Anything I tried, except the barbarian height = 100vh - 70px which is just temporary until I find a way to get it done.
          Is it even possible without javascript? I tried to see how quasar drawer is calculating the height but could not find it.

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

            QScrollArea is still there. Got missed in docs, but will be there for next website update. It hasn’t changed, so you can use the 0.17 docs for it in the mean time.
            Quasar drawer is calculating the height in the CSS just as you are (I believe).

            S 1 Reply Last reply Reply Quote 0
            • S
              SharpBCD @Hawkeye64 last edited by

              @hawkeye64 I know, I found and used QScroolArea. My question was on how to calculate the height like QDrawer. I could not found it in the code on github.

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