mirror of
https://github.com/ant-design/ant-design.git
synced 2025-01-18 22:36:31 +08:00
fix demo focus error
This commit is contained in:
parent
7c79a1c294
commit
c6c5a0c3a1
@ -69,10 +69,11 @@ const SearchInput = React.createClass({
|
||||
handleSubmit() {
|
||||
console.log('输入框内容是: ', this.state.value);
|
||||
},
|
||||
handleFocusBlur(e) {
|
||||
this.setState({
|
||||
focus: e.target === document.activeElement,
|
||||
});
|
||||
handleFocus() {
|
||||
this.setState({ focus: true });
|
||||
},
|
||||
handleBlur() {
|
||||
this.setState({ focus: false });
|
||||
},
|
||||
render() {
|
||||
const btnCls = classNames({
|
||||
@ -96,8 +97,8 @@ const SearchInput = React.createClass({
|
||||
showArrow={false}
|
||||
filterOption={false}
|
||||
onChange={this.handleChange}
|
||||
onFocus={this.handleFocusBlur}
|
||||
onBlur={this.handleFocusBlur}
|
||||
onFocus={this.handleFocus}
|
||||
onBlur={this.handleBlur}
|
||||
>
|
||||
{options}
|
||||
</Select>
|
||||
|
Loading…
Reference in New Issue
Block a user