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

    QSelect label-slot issue

    Framework
    2
    4
    537
    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.
    • C
      CDO last edited by

      Hi,

      I would want to handle q-select label display according to a variable :

      <q-select :label-slot="showLabel" label="My label" ... />
      

      Unfortunately, :label-slot=“false” will display the label anyway 😕
      Note that the opposite is working, i.e :label-slot=“true” without label (even if I don’t really see its interest…).

      I’ve also tried :label=“showLabel ? ‘My label’ : null”, but I still have a blank label.
      The only way not to have a label is to not set the label attribute at all.

      Thanks for your help !

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

        Not sure what is it you are trying to do. But maybe this? https://codepen.io/smolinari/pen/rNemXoB?editors=1010

        Scott

        1 Reply Last reply Reply Quote 1
        • C
          CDO last edited by

          Thanks for your reply.
          However, in your example, the label is hidden but its slot is still here (blank space on top).

          I’ve found a way to do what I want :

          <q-select :label-slot=“showLabel” … >
          <template v-slot:label>
          My label
          </template>
          </q-select>

          Regards.

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

            Yeah. The label-slot prop basically just means you want to put your own content into the label slot.

            Scott

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