mirror of
https://gitee.com/baidu/amis.git
synced 2024-12-02 03:48:13 +08:00
fix:Select值不变时不应触发change
This commit is contained in:
parent
921ea09052
commit
9f1beac871
@ -675,6 +675,9 @@ export class Select extends React.Component<SelectProps, SelectState> {
|
||||
simpleValue ? selection.map(item => item[valueField]) : selection
|
||||
);
|
||||
} else {
|
||||
// Downshift里面的判断修改后的值是否相等时,没有区分是否多选,且用的是!==,所以这里拦截一下
|
||||
(!selection.length ||
|
||||
selection[0][valueField] !== selectItem[valueField]) &&
|
||||
onChange(simpleValue ? selectItem[valueField] : selectItem);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user