combo修改tab的activeKey为有效值

This commit is contained in:
catchonme 2019-11-15 11:03:35 +08:00
parent 0782266701
commit af2de7be16
1 changed files with 1 additions and 1 deletions

View File

@ -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));
}
}
}