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

    Q-Scroll-Area Height

    Help
    6
    6
    2036
    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.
    • D
      dylanreeve last edited by

      I’ve had various issues with trying to get a responsive Scroll Area.

      This post was helpful: https://forum.quasar-framework.org/topic/3756/best-practice-setting-up-q-scroll-area

      But it still wasn’t working for me, even when I had the flex columns working as intended.

      The key I found was needing to have an absolute height set on at least one parent element. What I ended up doing was attaching a Style-Fn to the q-page element…

      <q-page class="column" :style-fn="styleFn">
      

      And then a function that sets absolute height instead of the default min-height

      styleFn(offset, height) {
        let pageheight = height - offset;
        console.log("PageHeight: " + pageheight);
        return "height: " + pageheight + "px";
      }
      

      After that I found that the scroll area sized properly simply by adding the col class.

      I posted this because it vexed me for ages and I couldn’t find a clear solution.

      1 Reply Last reply Reply Quote 2
      • J
        jaybo_nomad last edited by

        THE ABOVE IS THE MOST IMPORTANT POST ON THE ENTIRE INTERNET!!! VEXED? I WAS WAY BEYOND VEXED! I WAS DAZED! CONFUSED! CONTEMPLATING A BITTER END TO THINGS! GOING OFF THE DEEP END! WINDING MY WAY THROUGH A LONG DARK TUNNEL! DROWNING IN A POOL OF MY OWN TEARS! AT THE END OF MY ROPE!

        thank you

        1 Reply Last reply Reply Quote 0
        • B
          bjbstone last edited by

          I need this right now! Where do you define the variable for “height”? Are you getting the window height programmatically? Need help with how to do that!

          1 Reply Last reply Reply Quote 0
          • S
            smakinson last edited by

            Maybe helpful, maybe not 🙂 but I was facing a drawer with a q-scroll-area that was working and then it stopped working when I converted some content inside to use v-for, I was about to either just go with a div with overflow auto or look at calculating as mentioned above and then I added another div and it started working again. So I have a q-drawer with div.column, a couple div.col, then a div.col with the q-scroll-area using class=“fit” inside and at this point it was not working, then I added one more div (I used div-auto because of the design) and the scroll bar started working again.

            I did also just notice that if I check safari I had native scroll bars appearing on one of the parent divs ( I have not looked into which) so out of curiosity I changed the drawer to behavior=“mobile” and the q-scroll-area stopped working again. Sig, so I suppose its back to calculating and a bit of extra height somewhere must be what made it work again.

            1 Reply Last reply Reply Quote 0
            • S
              Shisiah last edited by Shisiah

              I came here looking for a solution but q-scroll-area didn’t work for me despite trying lots of variations with this component. So I removed q-scroll-area and implemented something like this:

              <div style="max-height: 440px; overflow: auto" class="col">
                        <div :visible="false" class="fit column">
              		  <!-- stuff you put here will be scrollable. You can adjust the max-height depending on your components -->
              		 </div>
              		</div>
              
              1 Reply Last reply Reply Quote 0
              • R
                Resistanc3 last edited by

                I mean yes is actually quite late for another answer… But i just signed in to say thanks to @dylanreeve for making my work evening much shorter… I just tried things like the past half hour…

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