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

    Having a q-item-label expand to available width

    Help
    2
    3
    2006
    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.
    • mboeni
      mboeni last edited by

      Hey there

      I’m doing a list and want to have a specific q-item-section expand to fill the available space. Consider the following code:

                                    <q-list bordered>
                                      <q-item clickable v-ripple>
                                        <q-item-section avatar>
                                          <q-avatar>
                                            <img :src="`https://cdn.quasar.dev/img/avatar6.jpg`">
                                          </q-avatar>
                                        </q-item-section>
                                        <q-item-section>
                                          <q-item-label>Topic Name</q-item-label>
                                        </q-item-section>
                                        <q-item-section>
                                          <q-item-label>Twitch</q-item-label>
                                          <q-item-label>Mixer</q-item-label>
                                          <q-item-label>YouTube</q-item-label>
                                        </q-item-section>
                                        <q-item-section>
                                          <q-item-label>Description goes here...</q-item-label>
                                        </q-item-section>
                                        <q-item-section>
                                          <q-item-label>External Link 1</q-item-label>
                                        </q-item-section>
                                        <q-item-section>
                                          <q-item-label>External Link 2</q-item-label>
                                        </q-item-section>
                                      </q-item>
                                    </q-list>
      

      I would like to have the q-item-label that holds the description use as much space horizontally as available (i.e. expand). What is the correct way to achieve this?

      Cheers,
      Michael

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

        Follow up: would wrapping the q-item-label in a <div> be the correct way of spacing the labels? I’m not really able to get this working right now -.-

        1 Reply Last reply Reply Quote 0
        • J
          jraez last edited by

          You may give a try to .col-auto css class.

          https://quasar.dev/layout/grid/introduction-to-flexbox#Managing-Children

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