Skip to content

Commit

Permalink
Merge pull request #294 from XiaoMi/hotfix/select
Browse files Browse the repository at this point in the history
fix:Select 筛选输入特殊匹配字符时造成崩溃的情况
  • Loading branch information
solarjoker authored Jun 13, 2019
2 parents 5c78efa + 488dd61 commit 53d3788
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion components/select/Select.js
Original file line number Diff line number Diff line change
Expand Up @@ -405,7 +405,7 @@ class Select extends Component {
searchable,
keyword
} = this.state
return this.isRemote() || (!searchable || !keyword) || (searchable && keyword && (String(item.id).match(keyword) || String(item.name).match(keyword)))
return this.isRemote() || (!searchable || !keyword) || (searchable && keyword && (String(item.id).includes(keyword) || String(item.name).includes(keyword)))
}

resetFocusedIndex (setState = true) {
Expand Down

0 comments on commit 53d3788

Please sign in to comment.