[TabLayout] fix currentKey condition
This commit is contained in:
@@ -92,7 +92,7 @@ class TabMenuItem {
|
||||
}
|
||||
|
||||
hasChildren = () => {
|
||||
return this.children.length > 1;
|
||||
return this.children.length > 0;
|
||||
};
|
||||
|
||||
getChildren = () => {
|
||||
@@ -311,7 +311,7 @@ export default function TabLayout({ topPanelName, onTabActivated, panelInfo }) {
|
||||
menuItems[i].spotlightId = menuInfo[j].spotlightId;
|
||||
menuItems[i].icons = menuInfo[j].icons;
|
||||
|
||||
if (currentKey === 10600 || 10500 || 10300) {
|
||||
if ([10600, 10500, 10300].includes(currentKey)) {
|
||||
menuItems[i].children = menuInfo.map((item) => ({
|
||||
id: item.id,
|
||||
title: item.title,
|
||||
|
||||
Reference in New Issue
Block a user