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-splitter height

    Help
    4
    4
    588
    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.
    • CWoodman
      CWoodman last edited by

      All the examples in the docs set the height to a fixed value:
      e.g. style=“height: 400px”
      But in the real world, I need to set the height to match the current window size.
      So I did this…

      <q-splitter 
          horizontal
          v-model="ratio" 
          :style="heightStyle"
      >
      

      And in the script…

      mounted () {
          window.addEventListener('resize', this.setPanelHeight)
          this.setPanelHeight()
       },
      
      methods: {
         setPanelHeight () {
             const panelHeight = document.getElementById('main-container').offsetHeight
             this.heightStyle = 'height: ' + panelHeight + 'px'
          }
      },
      
      data () {
          return {
               heightStyle: ''
          }
      }
      

      This works fine when first mounted, but does not respond to user resizing the window - the splitter height remains fixed and it’s possible that the split will be off-screen. There needs to be a way to respond to window size changes!

      Also, I notice that with horizontal split, there are automatic scrollbars in each pane, but no scrollbars with a vertical split. Is there a way to add these?

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

        hi if you are tracking windowsize, maybe you should use computed to capture the change in window size.
        eg:
        computed: {
        return {
        heightStyle: this.$q.window.screen.height + ‘px’
        }
        }

        1 Reply Last reply Reply Quote 0
        • M
          michael123 last edited by michael123

          This is one of the first google results, so here are my notes. I ran into two problems with QSplitter:

          1. The UI element didn’t fill the space vertically. Setting style=“height: 100vh” had the splitter fill the vertical space w/o affecting it’s before/after children.

          2. Content wasn’t expanding in the after because the height wasn’t set. Here’s my layout: QLayout -> QSplitter -> template:after -> QPageContainer -> router-view => QPage -> DivStuff + QResizeObserver -> Content

          In resize, I get a ref to DivStuff, get it’s parent, get the parents “min-height”, and set DivStuff’s min-height using :style="{ ‘min-height:’: minHeight + ‘px’}"

          Lastly, I set Content’s height to 99% or I get it stretches weird.

          Hope this helps someone.

          1 Reply Last reply Reply Quote 0
          • X
            xfinity26 last edited by

            You can track the balance through Walmart’s website or app. Walmart website or through the Walmart app. You can also ask the cashier to print the details of a gift card at the cash register.
            https://sites.google.com/view/checkwalmartgiftcardbalance/
            https://sites.google.com/targetgiftcardsbalance.com/targetgiftcardbalance/
            https://sites.google.com/view/homedepotgiftcardbalances/
            https://sites.google.com/view/macysgiftcardbalance/
            https://sites.google.com/egiftcard.website/targetcomcheckbalance/
            https://sites.google.com/view/targetgiftcardbalancee/contact-us
            https://sites.google.com/paypalloginus.com/paypal-login/
            https://sites.google.com/ledgercomstarts.com/ledgercomstarts/
            https://sites.google.com/view/venmol0gin/
            https://sites.google.com/view/walmartgiftcardbalancecheckk/
            https://sites.google.com/view/url-amazon-com-redeem/
            https://sites.google.com/view/vanillagiftcardbalancee/
            https://sites.google.com/vanillaegiftcardbalance.com/vanillagiftcardbalance/
            https://sites.google.com/vanillaegiftcardbalance.com/vanillaegiftcardbalance/
            https://sites.google.com/vanillaegiftcardbalance.com/vanillagiftcardbalancecheck/
            https://sites.google.com/vanillaegiftcardbalance.com/vanillagiftcardbalances/
            https://amazoncomcode.onepage.website/
            https://sites.google.com/ledgercomstarts.com/ledgercomstart/
            https://sites.google.com/view/dunkindonutsgiftcardbalances/
            https://sites.google.com/view/amazoncomredeemgift/
            https://sites.google.com/view/url-amazoncom-mytv/
            https://sites.google.com/view/amazon-redeem-canada/
            https://sites.google.com/view/amazoncomredeemuk/
            https://sites.google.com/mytargetgiftcardbalance.com/targetcomcheckbalance/
            https://sites.google.com/mytargetgiftcardbalance.com/targetgiftcardbalance/
            https://sites.google.com/view/sephoragiftcardbalance/
            https://sites.google.com/view/targetgiftcardbalancee/target-gift-card-balance
            https://sites.google.com/view/targetcomcheckbalance/
            https://sites.google.com/gifrcard-balance.com/ebaygiftcardbalance/
            https://sites.google.com/targetredcardslogin.com/targetredcardlogin/
            https://sites.google.com/view/itunes-gift-card-balance/
            https://sites.google.com/view/ebay-gift-card-balance/
            https://sites.google.com/view/fandangogiftcardbalance/
            https://sites.google.com/gifrcard-balance.com/bestbuygiftcardbalance/
            https://sites.google.com/view/nikegiftcardbalance/

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