mirror of
https://gitee.com/baidu/amis.git
synced 2024-11-29 18:48:45 +08:00
Merge pull request #11080 from allenve/fix-tabs-defaultActiveKey
fix: tabs activeKey 失效
This commit is contained in:
commit
9597f79764
@ -271,10 +271,10 @@ export default class Tabs extends React.Component<TabsProps, TabsState> {
|
||||
? resolveVariableAndFilter(props.defaultKey, props.data)
|
||||
: props.defaultKey;
|
||||
} else if (props.defaultActiveKey) {
|
||||
activeKey = resolveVariableAndFilter(
|
||||
props.defaultActiveKey,
|
||||
props.data
|
||||
);
|
||||
activeKey =
|
||||
typeof props.defaultActiveKey === 'string'
|
||||
? resolveVariableAndFilter(props.defaultActiveKey, props.data)
|
||||
: props.defaultActiveKey;
|
||||
}
|
||||
|
||||
activeKey = activeKey || (tabs[0] && tabs[0].hash) || 0;
|
||||
|
Loading…
Reference in New Issue
Block a user