mirror of
https://gitee.com/ant-design-vue/ant-design-vue.git
synced 2024-11-30 02:57:50 +08:00
fix: defaultActiveFirstOption is true and activeKey is Falsy will ret… (#1979)
* fix: defaultActiveFirstOption is true and activeKey is Falsy will return the next child key #1727 * fix: defaultActiveFirstOption is true and activeKey is undefined #1727
This commit is contained in:
parent
082dc2ade0
commit
94b701c077
@ -65,7 +65,8 @@ export function getActiveKey(props, originalActiveKey) {
|
||||
if (defaultActiveFirst) {
|
||||
loopMenuItem(children, (c, i) => {
|
||||
const propsData = c.componentOptions.propsData || {};
|
||||
if (!activeKey && c && !propsData.disabled) {
|
||||
const noActiveKey = activeKey === null || activeKey === undefined;
|
||||
if (noActiveKey && c && !propsData.disabled) {
|
||||
activeKey = getKeyFromChildrenIndex(c, eventKey, i);
|
||||
}
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user