File tree Expand file tree Collapse file tree 2 files changed +19
-2
lines changed
client/packages/lowcoder/src Expand file tree Collapse file tree 2 files changed +19
-2
lines changed Original file line number Diff line number Diff line change @@ -136,13 +136,29 @@ function fixOldStyleData(oldData: any) {
136136 return oldData ;
137137}
138138
139+ function fixOldItemsData ( oldData : any ) {
140+ if ( Array . isArray ( oldData ) ) {
141+ return {
142+ optionType : "manual" ,
143+ manual : oldData ,
144+ } ;
145+ }
146+ if ( oldData && ! oldData . optionType && Array . isArray ( oldData . manual ) ) {
147+ return {
148+ optionType : "manual" ,
149+ manual : oldData . manual ,
150+ } ;
151+ }
152+ return oldData ;
153+ }
154+
139155const childrenMap = {
140156 logoUrl : StringControl ,
141157 logoEvent : withDefault ( eventHandlerControl ( logoEventHandlers ) , [ { name : "click" } ] ) ,
142158 horizontalAlignment : alignWithJustifyControl ( ) ,
143159 style : migrateOldData ( styleControl ( NavigationStyle , 'style' ) , fixOldStyleData ) ,
144160 animationStyle : styleControl ( AnimationStyle , 'animationStyle' ) ,
145- items : withDefault ( createNavItemsControl ( ) , {
161+ items : withDefault ( migrateOldData ( createNavItemsControl ( ) , fixOldItemsData ) , {
146162 optionType : "manual" ,
147163 manual : [
148164 {
@@ -320,7 +336,6 @@ function createNavItemsControl() {
320336 { label : trans ( "prop.map" ) , value : "map" } ,
321337 ] as const ;
322338
323- // Variant used in Map mode
324339 const NavMapOption = new MultiCompBuilder (
325340 {
326341 label : StringControl ,
Original file line number Diff line number Diff line change @@ -26,6 +26,8 @@ export const en = {
2626 "text" : "Text" ,
2727 "basic" : "Basic" ,
2828 "label" : "Label" ,
29+ "hidden" : "Hidden" ,
30+ "disabled" : "Disabled" ,
2931 "layout" : "Layout" ,
3032 "color" : "Color" ,
3133 "form" : "Form" ,
You can’t perform that action at this time.
0 commit comments