Merge pull request #2753 from tugcekucukoglu/dropdown-label

Fixed #2751 - Dropdown: with template and no placeholder shows p-empt…
pull/2757/head
Tuğçe Küçükoğlu 2022-07-04 11:55:33 +03:00 committed by GitHub
commit d1559266e4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -7,7 +7,7 @@
<input v-if="editable" type="text" class="p-dropdown-label p-inputtext" :disabled="disabled" @focus="onFocus" @blur="onBlur" :placeholder="placeholder" :value="editableInputValue" @input="onEditableInput"
aria-haspopup="listbox" :aria-expanded="overlayVisible">
<span v-if="!editable" :class="labelClass">
<slot name="value" :value="modelValue" :placeholder="placeholder">{{label||'empty'}}</slot>
<slot name="value" :value="modelValue" :placeholder="placeholder">{{label === 'p-emptylabel' ? '&nbsp;' : label ||'empty'}}</slot>
</span>
<i v-if="showClear && modelValue != null" class="p-dropdown-clear-icon pi pi-times" @click="onClearClick($event)"></i>
<div class="p-dropdown-trigger" role="button" aria-haspopup="listbox" :aria-expanded="overlayVisible">