File tree 1 file changed +24
-14
lines changed
packages/project-editor/lvgl/widgets
1 file changed +24
-14
lines changed Original file line number Diff line number Diff line change @@ -47,20 +47,30 @@ export class LVGLKeyboardWidget extends LVGLWidget {
47
47
name : "textarea" ,
48
48
type : PropertyType . Enum ,
49
49
enumItems : ( widget : LVGLKeyboardWidget ) => {
50
- const page = getAncestorOfType (
51
- widget ,
52
- ProjectEditor . PageClass . classInfo
53
- ) as Page ;
54
- return page . _lvglWidgets
55
- . filter (
56
- lvglWidget =>
57
- lvglWidget instanceof LVGLTextareaWidget &&
58
- lvglWidget . identifier
59
- )
60
- . map ( lvglWidget => ( {
61
- id : lvglWidget . identifier ,
62
- label : lvglWidget . identifier
63
- } ) ) ;
50
+ let lvglIdentifiers = ProjectEditor . getProjectStore (
51
+ widget
52
+ ) . lvglIdentifiers . getIdentifiersVisibleFromFlow (
53
+ ProjectEditor . getFlow ( widget )
54
+ ) ;
55
+
56
+ lvglIdentifiers = lvglIdentifiers . filter ( lvglIdentifier => {
57
+ if ( lvglIdentifier . widgets . length > 1 ) {
58
+ return false ;
59
+ }
60
+
61
+ const widget = lvglIdentifier . widgets [ 0 ] ;
62
+
63
+ return widget instanceof LVGLTextareaWidget ;
64
+ } ) ;
65
+
66
+ lvglIdentifiers . sort ( ( a , b ) =>
67
+ a . identifier . localeCompare ( b . identifier )
68
+ ) ;
69
+
70
+ return lvglIdentifiers . map ( lvglIdentifier => ( {
71
+ id : lvglIdentifier . identifier ,
72
+ label : lvglIdentifier . identifier
73
+ } ) ) ;
64
74
} ,
65
75
propertyGridGroup : specificGroup
66
76
} ,
You can’t perform that action at this time.
0 commit comments