fix: #6084, SELECT: hide clear button when options is empty in Dropdown

pull/6085/head
ANTONA09 2024-07-19 14:35:37 +05:30
parent 5c461c9aec
commit 79537911b3
1 changed files with 2 additions and 2 deletions

View File

@ -191,7 +191,7 @@
<script> <script>
import { absolutePosition, addStyle, findSingle, focus, getFirstFocusableElement, getFocusableElements, getLastFocusableElement, getOuterWidth, isAndroid, isTouchDevice, isVisible, relativePosition } from '@primeuix/utils/dom'; import { absolutePosition, addStyle, findSingle, focus, getFirstFocusableElement, getFocusableElements, getLastFocusableElement, getOuterWidth, isAndroid, isTouchDevice, isVisible, relativePosition } from '@primeuix/utils/dom';
import { equals, findLastIndex, isEmpty, isNotEmpty, isPrintableCharacter, resolveFieldData } from '@primeuix/utils/object'; import { equals, findLastIndex, isNotEmpty, isPrintableCharacter, resolveFieldData } from '@primeuix/utils/object';
import { ZIndex } from '@primeuix/utils/zindex'; import { ZIndex } from '@primeuix/utils/zindex';
import { FilterService } from '@primevue/core/api'; import { FilterService } from '@primevue/core/api';
import { ConnectedOverlayScrollHandler, UniqueComponentId } from '@primevue/core/utils'; import { ConnectedOverlayScrollHandler, UniqueComponentId } from '@primevue/core/utils';
@ -433,7 +433,7 @@ export default {
this.clicked = false; this.clicked = false;
}, },
isClearIconVisible() { isClearIconVisible() {
return this.showClear && this.modelValue != null && !isEmpty(this.options); return this.showClear && this.modelValue != null && isNotEmpty(this.options);
}, },
onEditableInput(event) { onEditableInput(event) {
const value = event.target.value; const value = event.target.value;