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

    Shrink q-select to fit in q-bar

    Framework
    4
    10
    1687
    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.
    • R
      Roger last edited by

      Using v1.0.0-beta.23 (UMD installation), I’m trying to shrink/size a q-select so that its height fits within a q-bar. Are there options or CSS that can do that?

      My HTML is simply:

              <q-layout id="app" view="hHh lpR fFf">
                  <q-header>
                      <q-bar>
                          <q-btn dense flat icon="fa fa-arrow-up"></q-btn>
                          <q-select rounded outlined dense multiple use-chips hide-dropdown-icon options-dense
                                    max-values="3" bg-color="red"
                                    class="col-grow" :options="tags" v-model="selectedTags">
                              <template v-slot:prepend>
                                  <q-icon name="fa fa-search"></q-icon>
                              </template>
                          </q-select>
                      </q-bar>
                  </q-header>
              </q-layout>
      

      Thanks for any ideas!

      Jezzta667 1 Reply Last reply Reply Quote 0
      • s.molinari
        s.molinari last edited by

        You mean something like this?

        https://codepen.io/smolinari/pen/NVryQj

        Scott

        R 1 Reply Last reply Reply Quote 0
        • Jezzta667
          Jezzta667 @Roger last edited by

          @Roger I think the ‘dense’ attribute may do the trick

          1 Reply Last reply Reply Quote 0
          • s.molinari
            s.molinari last edited by

            You’ve got that already in your code. 😄

            Scott

            Jezzta667 1 Reply Last reply Reply Quote 0
            • Jezzta667
              Jezzta667 @s.molinari last edited by

              @s-molinari oh derr. I really shouldn’t answer questions on my phone (or perhaps at all) 😂

              1 Reply Last reply Reply Quote 0
              • R
                Roger @s.molinari last edited by

                @s-molinari Thanks, but that example uses a q-toolbar instead of a q-bar. I’m trying to get q-select to fit in the smaller vertical height of a q-bar.

                Here’s an example showing the difference: https://codepen.io/RogerGA/pen/gJMKQp

                1 Reply Last reply Reply Quote 0
                • s.molinari
                  s.molinari last edited by s.molinari

                  Ahh…see, I would never have even thought to put a QSelect in a QBar and why I didn’t read it properly. And, to be honest, QBar isn’t made for adding a QSelect or any other form inputs.

                  What is it you are trying to add or get accomplished?

                  Scott

                  R 1 Reply Last reply Reply Quote 0
                  • R
                    Roger @s.molinari last edited by

                    @s-molinari Ultimately, I’m just trying to make an aesthetic change… The app that I’m working on is strictly for desktop browsers and this q-select will appear at the top of a dialog box. The q-toolbar (and standard-sized q-select) would functionally work but they take up so much vertical space that they look silly in this particular use case.

                    Long story longer, I’m just trying to use smaller controls so they look better in this situation and waste less space.

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

                      @Roger you will have to override css https://codepen.io/metalsadman/pen/oRLoYg which is still kinda ugly, my suggestion would be just to put a dense “search” button that would invoke a popup proxy with a select search kinda function inside like this https://codepen.io/metalsadman/pen/xNOmVO.

                      R 1 Reply Last reply Reply Quote 0
                      • R
                        Roger @metalsadman last edited by

                        @metalsadman Thanks! I’ll explore those.

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