vue-search-select icon indicating copy to clipboard operation
vue-search-select copied to clipboard

Add slot for option in model-select

Open nicolalandro opened this issue 6 years ago • 1 comments

With this feature, the options into a model-select can have custom template specified from the user using the slot, in order to add color to a specific part of the text or use all html needed in general. If no slot is specified from the user, the behavior is the existing.

Example:

<model-select :options="options" placeholder="select item" v-model="item">
   <template slot="option" slot-scope="option"> 
      {{ option.value.text }} <span style="color:blue">HAVE VALUE: {{ option.value.value }} </span> 
   </template>
</model-select>

nicolalandro avatar Mar 01 '19 13:03 nicolalandro

I'd love if somebody could review this PR.
I'd be happy to help out as well.

MartinP7r avatar Jun 10 '19 07:06 MartinP7r