pull/6101/head
tugcekucukoglu 2024-07-22 16:10:09 +03:00
parent c02defa960
commit 37fedd0426
1 changed files with 4 additions and 4 deletions

View File

@ -48,7 +48,7 @@
> >
<slot name="value" :value="modelValue" :placeholder="placeholder">{{ label === 'p-emptylabel' ? '&nbsp;' : label || 'empty' }}</slot> <slot name="value" :value="modelValue" :placeholder="placeholder">{{ label === 'p-emptylabel' ? '&nbsp;' : label || 'empty' }}</slot>
</span> </span>
<slot v-if="isClearIconVisible()" name="clearicon" :class="cx('clearIcon')" :clearCallback="onClearClick"> <slot v-if="isClearIconVisible" name="clearicon" :class="cx('clearIcon')" :clearCallback="onClearClick">
<component :is="clearIcon ? 'i' : 'TimesIcon'" ref="clearIcon" :class="[cx('clearIcon'), clearIcon]" @click="onClearClick" v-bind="ptm('clearIcon')" data-pc-section="clearicon" /> <component :is="clearIcon ? 'i' : 'TimesIcon'" ref="clearIcon" :class="[cx('clearIcon'), clearIcon]" @click="onClearClick" v-bind="ptm('clearIcon')" data-pc-section="clearicon" />
</slot> </slot>
<div :class="cx('dropdown')" v-bind="ptm('dropdown')"> <div :class="cx('dropdown')" v-bind="ptm('dropdown')">
@ -432,9 +432,6 @@ export default {
this.clicked = false; this.clicked = false;
}, },
isClearIconVisible() {
return this.showClear && this.modelValue != null && isNotEmpty(this.options);
},
onEditableInput(event) { onEditableInput(event) {
const value = event.target.value; const value = event.target.value;
@ -993,6 +990,9 @@ export default {
ariaSetSize() { ariaSetSize() {
return this.visibleOptions.filter((option) => !this.isOptionGroup(option)).length; return this.visibleOptions.filter((option) => !this.isOptionGroup(option)).length;
}, },
isClearIconVisible() {
return this.showClear && this.modelValue != null && isNotEmpty(this.options);
},
virtualScrollerDisabled() { virtualScrollerDisabled() {
return !this.virtualScrollerOptions; return !this.virtualScrollerOptions;
} }