Skip to content

Commit

Permalink
fix(CascaderSelect): focus to input after select (#3712)
Browse files Browse the repository at this point in the history
  • Loading branch information
潕量 authored Jan 27, 2022
1 parent 667a11b commit 6a2537d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/cascader-select/cascader-select.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -552,7 +552,8 @@ class CascaderSelect extends Component {
}

if (['fromCascader', 'keyboard'].indexOf(type) !== -1 && !visible) {
this.select.focusInput();
// 这里需要延迟下,showSearch 的情况下通过手动设置 menuProps={{focusable: true}} 回车 focus 会有延迟
setTimeout(() => this.select.focusInput(), 0);
}

this.props.onVisibleChange(visible, type);
Expand Down

0 comments on commit 6a2537d

Please sign in to comment.