mirror of
https://gitee.com/baidu/amis.git
synced 2024-12-04 21:08:55 +08:00
combo修改tab的activeKey为有效值
This commit is contained in:
parent
0782266701
commit
af2de7be16
@ -153,7 +153,7 @@ export default class ComboControl extends React.Component<ComboProps> {
|
||||
});
|
||||
|
||||
if (store.activeKey >= values.length) {
|
||||
store.setActiveKey(values.length - 1);
|
||||
store.setActiveKey(Math.max(0, values.length - 1));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user