Select search 功能优化
This commit is contained in:
parent
7366e877f7
commit
4302ce2325
|
@ -343,8 +343,7 @@ export class Select extends React.Component<SelectProps, SelectState> {
|
||||||
|
|
||||||
onBlur(e: any) {
|
onBlur(e: any) {
|
||||||
this.setState({
|
this.setState({
|
||||||
isFocused: false,
|
isFocused: false
|
||||||
inputValue: ''
|
|
||||||
});
|
});
|
||||||
|
|
||||||
this.props.onBlur && this.props.onBlur(e);
|
this.props.onBlur && this.props.onBlur(e);
|
||||||
|
@ -440,7 +439,6 @@ export class Select extends React.Component<SelectProps, SelectState> {
|
||||||
case DownshiftChangeTypes.clickItem:
|
case DownshiftChangeTypes.clickItem:
|
||||||
update = {
|
update = {
|
||||||
...update,
|
...update,
|
||||||
inputValue: '',
|
|
||||||
isOpen: multiple ? true : false,
|
isOpen: multiple ? true : false,
|
||||||
isFocused: multiple && checkAll ? true : false
|
isFocused: multiple && checkAll ? true : false
|
||||||
};
|
};
|
||||||
|
@ -632,7 +630,7 @@ export class Select extends React.Component<SelectProps, SelectState> {
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
{...getItemProps({
|
{...getItemProps({
|
||||||
key: index,
|
key: item.value || index,
|
||||||
index,
|
index,
|
||||||
item,
|
item,
|
||||||
disabled: item.disabled
|
disabled: item.disabled
|
||||||
|
|
Loading…
Reference in New Issue