|
@@ -429,13 +429,17 @@ export default class TreeSelectFoundation<P = Record<string, any>, S = Record<st
|
|
|
|
|
|
handleClick(e: any) {
|
|
handleClick(e: any) {
|
|
const isDisabled = this._isDisabled();
|
|
const isDisabled = this._isDisabled();
|
|
- const { isOpen } = this.getStates();
|
|
|
|
|
|
+ const { isOpen, inputValue } = this.getStates();
|
|
|
|
+ const { searchPosition } = this.getProps();
|
|
if (isDisabled) {
|
|
if (isDisabled) {
|
|
return;
|
|
return;
|
|
} else if (!isOpen) {
|
|
} else if (!isOpen) {
|
|
this.open();
|
|
this.open();
|
|
this._notifyFocus(e);
|
|
this._notifyFocus(e);
|
|
} else if (isOpen) {
|
|
} else if (isOpen) {
|
|
|
|
+ if (searchPosition === 'trigger' && inputValue) {
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
this.close(e);
|
|
this.close(e);
|
|
}
|
|
}
|
|
}
|
|
}
|