Skip to content

Commit

Permalink
Refactor #6084
Browse files Browse the repository at this point in the history
  • Loading branch information
tugcekucukoglu committed Jul 22, 2024
1 parent c02defa commit 37fedd0
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/primevue/src/select/Select.vue
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
>
<slot name="value" :value="modelValue" :placeholder="placeholder">{{ label === 'p-emptylabel' ? '&nbsp;' : label || 'empty' }}</slot>
</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" />
</slot>
<div :class="cx('dropdown')" v-bind="ptm('dropdown')">
Expand Down Expand Up @@ -432,9 +432,6 @@ export default {
this.clicked = false;
},
isClearIconVisible() {
return this.showClear && this.modelValue != null && isNotEmpty(this.options);
},
onEditableInput(event) {
const value = event.target.value;
Expand Down Expand Up @@ -993,6 +990,9 @@ export default {
ariaSetSize() {
return this.visibleOptions.filter((option) => !this.isOptionGroup(option)).length;
},
isClearIconVisible() {
return this.showClear && this.modelValue != null && isNotEmpty(this.options);
},
virtualScrollerDisabled() {
return !this.virtualScrollerOptions;
}
Expand Down

0 comments on commit 37fedd0

Please sign in to comment.