Pass placeholder as well

pull/310/head
cagataycivici 2020-04-17 23:48:49 +03:00
parent b2a9a0dfc1
commit 0a12e2330e
1 changed files with 2 additions and 2 deletions

View File

@ -6,7 +6,7 @@
</div> </div>
<div class="p-multiselect-label-container"> <div class="p-multiselect-label-container">
<label :class="labelClass"> <label :class="labelClass">
<slot name="value" :value="value"> <slot name="value" :value="value" :placeholder="placeholder">
{{label}} {{label}}
</slot> </slot>
</label> </label>
@ -358,7 +358,7 @@ export default {
'p-multiselect-label', 'p-multiselect-label',
{ {
'p-placeholder': this.label === this.placeholder, 'p-placeholder': this.label === this.placeholder,
'p-multiselect-label-empty': !this.placeholder && (!this.value || this.value.length === 0) 'p-multiselect-label-empty': !this.$scopedSlots['value'] && !this.placeholder && (!this.value || this.value.length === 0)
} }
]; ];
}, },