Skip to content

Commit f7ec8fd

Browse files
authored
Merge pull request #510 from raheeliftikhar5/nav-layout-updates
Nav Layout Fixes/Updates
2 parents d3ef400 + a3389a4 commit f7ec8fd

File tree

7 files changed

+600
-55
lines changed

7 files changed

+600
-55
lines changed

client/packages/lowcoder/src/comps/comps/layout/layoutMenuItemComp.tsx

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -38,15 +38,13 @@ export class LayoutMenuItemComp extends MultiBaseComp<ChildrenType> {
3838
}
3939

4040
override getPropertyView(): ReactNode {
41-
const isLeaf = this.children.items.getView().length === 0;
4241
return (
4342
<>
44-
{isLeaf &&
45-
this.children.action.propertyView({
46-
onAppChange: (label) => {
47-
label && this.children.label.dispatchChangeValueAction(label);
48-
},
49-
})}
43+
{this.children.action.propertyView({
44+
onAppChange: (label) => {
45+
label && this.children.label.dispatchChangeValueAction(label);
46+
},
47+
})}
5048
{this.children.label.propertyView({ label: trans("label") })}
5149
{this.children.icon.propertyView({
5250
label: trans("icon"),
@@ -98,12 +96,17 @@ const LayoutMenuItemCompMigrate = migrateOldData(LayoutMenuItemComp, (oldData: a
9896
export class LayoutMenuItemListComp extends list(LayoutMenuItemCompMigrate) {
9997
addItem(value?: any) {
10098
const data = this.getView();
99+
101100
this.dispatch(
102101
this.pushAction(
103-
value || {
104-
label: trans("menuItem") + " " + (data.length + 1),
105-
itemKey: genRandomKey(),
106-
}
102+
value
103+
? {
104+
...value,
105+
itemKey: value.itemKey || genRandomKey(),
106+
} : {
107+
label: trans("menuItem") + " " + (data.length + 1),
108+
itemKey: genRandomKey(),
109+
}
107110
)
108111
);
109112
}

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy