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

    Passing props through wrapper or overriding default props

    Framework
    2
    2
    104
    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
      rniestroj last edited by

      Hi,
      i’ve created a wrapper over q-select like this, let’s call it OrganisationSelect:

      <template lang="pug">
        q-select(
          :options="organisations"
          option-value="id"
          v-bind="$attrs"
          v-on="$listeners"
          :option-label="item => item.details.name"
          :label="this.defaultLabel()")
      </template>
      

      Evrything works as expected, props and events are passed.

      Now when i use it i want to override the :label

      div.col-4
       OrganiastionSelect(
        :rules="[val => !!val || 'Please select an Organisation']"
        v-model='organisation'
        :label="this.otherLabel()"
        dense
      ).col-6
      

      But this does not work. It displays always the default label. How to make this work?

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

        @rniestroj don’t refer to this in the template.

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