@homecode/ui 4.28.3 → 4.28.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -494,7 +494,7 @@ class Select extends Component {
|
|
|
494
494
|
renderTriggerArrow() {
|
|
495
495
|
const { size, inputProps, disableTriggerArrow } = this.props;
|
|
496
496
|
const { isOpen, searchVal } = this.store;
|
|
497
|
-
if (disableTriggerArrow
|
|
497
|
+
if (disableTriggerArrow || (inputProps?.hasClear && searchVal))
|
|
498
498
|
return null;
|
|
499
499
|
return (jsx(Icon, { type: "chevronDown", className: cn(S.triggerArrow, isOpen && S.isOpen), size: size }));
|
|
500
500
|
}
|
|
@@ -174,7 +174,7 @@ function Select2(props) {
|
|
|
174
174
|
}, [isMultiple$1, value, ids]);
|
|
175
175
|
// console.log('selectedLabel::', selectedLabel);
|
|
176
176
|
const triggerArrow = useMemo(() => {
|
|
177
|
-
if (disableTriggerArrow
|
|
177
|
+
if (disableTriggerArrow || (inputProps?.hasClear && searchVal))
|
|
178
178
|
return null;
|
|
179
179
|
return (jsx(Icon, { type: "chevronDown", className: cn(S.triggerArrow, isOpen && S.isOpen), size: size }));
|
|
180
180
|
}, [isOpen, searchVal]);
|