mirror of
https://gitee.com/baidu/amis.git
synced 2024-11-29 18:39:05 +08:00
fix: 修复 tree-select 搜索后需要点击两次才能点中子节点问题 (#4558)
* fix: 修复 tree-select 搜索后需要点击两次才能点中子节点问题 * fix: 修复 tree-select 搜索后需要点击两次才能点中子节点问题
This commit is contained in:
parent
22907c16a4
commit
0ee35f53ac
2
.gitignore
vendored
2
.gitignore
vendored
@ -29,3 +29,5 @@ node_modules
|
||||
dist
|
||||
tsconfig.tsbuildinfo
|
||||
lerna-debug.log
|
||||
.rollup.cache
|
||||
package-lock.json
|
||||
|
50870
package-lock.json
generated
50870
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
3
packages/amis-ui/.gitignore
vendored
3
packages/amis-ui/.gitignore
vendored
@ -1,6 +1,5 @@
|
||||
/lib
|
||||
lib/
|
||||
/node_modules
|
||||
/esm
|
||||
/.rollup.cache
|
||||
/tsconfig.tsbuildinfo
|
||||
/coverage
|
4
packages/amis/.gitignore
vendored
4
packages/amis/.gitignore
vendored
@ -1,6 +1,6 @@
|
||||
/dist
|
||||
/lib
|
||||
/sdk
|
||||
lib
|
||||
sdk
|
||||
/public
|
||||
/gh-pages
|
||||
/output
|
||||
|
@ -108,7 +108,6 @@ export interface TreeSelectProps extends OptionsControlProps {
|
||||
|
||||
export interface TreeSelectState {
|
||||
isOpened: boolean;
|
||||
isFocused: boolean;
|
||||
inputValue: string;
|
||||
}
|
||||
|
||||
@ -153,8 +152,7 @@ export default class TreeSelectControl extends React.Component<
|
||||
|
||||
this.state = {
|
||||
inputValue: '',
|
||||
isOpened: false,
|
||||
isFocused: false
|
||||
isOpened: false
|
||||
};
|
||||
|
||||
this.open = this.open.bind(this);
|
||||
@ -202,9 +200,6 @@ export default class TreeSelectControl extends React.Component<
|
||||
|
||||
handleFocus(e: any) {
|
||||
const {dispatchEvent, value, data} = this.props;
|
||||
this.setState({
|
||||
isFocused: true
|
||||
});
|
||||
dispatchEvent(
|
||||
'focus',
|
||||
createObject(data, {
|
||||
@ -215,9 +210,6 @@ export default class TreeSelectControl extends React.Component<
|
||||
|
||||
handleBlur(e: any) {
|
||||
const {dispatchEvent, value, data} = this.props;
|
||||
this.setState({
|
||||
isFocused: false
|
||||
});
|
||||
dispatchEvent(
|
||||
'blur',
|
||||
createObject(data, {
|
||||
@ -647,7 +639,6 @@ export default class TreeSelectControl extends React.Component<
|
||||
'TreeSelect--searchable':
|
||||
searchable || isEffectiveApi(autoComplete),
|
||||
'is-opened': this.state.isOpened,
|
||||
'is-focused': this.state.isFocused,
|
||||
'is-disabled': disabled
|
||||
})}
|
||||
result={
|
||||
|
Loading…
Reference in New Issue
Block a user