Passing props through wrapper or overriding default props
-
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?
-
@rniestroj don’t refer to
this
in the template.