File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed
client/packages/lowcoder/src/comps/comps/navComp Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -153,11 +153,13 @@ const NavCompBase = new UICompBuilder(childrenMap, (props) => {
153
153
if ( hidden ) {
154
154
return null ;
155
155
}
156
- const visibleSubItems = items . filter ( ( item ) => ! item . children . hidden . getView ( ) ) ;
157
156
const subMenuItems : Array < { key : string ; label : string } > = [ ] ;
158
157
const subMenuSelectedKeys : Array < string > = [ ] ;
159
- visibleSubItems . forEach ( ( subItem , index ) => {
160
- const key = index + "" ;
158
+ items . forEach ( ( subItem , originalIndex ) => {
159
+ if ( subItem . children . hidden . getView ( ) ) {
160
+ return ;
161
+ }
162
+ const key = originalIndex + "" ;
161
163
subItem . children . active . getView ( ) && subMenuSelectedKeys . push ( key ) ;
162
164
subMenuItems . push ( {
163
165
key : key ,
@@ -184,7 +186,7 @@ const NavCompBase = new UICompBuilder(childrenMap, (props) => {
184
186
{ items . length > 0 && < DownOutlined /> }
185
187
</ Item >
186
188
) ;
187
- if ( visibleSubItems . length > 0 ) {
189
+ if ( subMenuItems . length > 0 ) {
188
190
const subMenu = (
189
191
< StyledMenu
190
192
onClick = { ( e ) => {
You can’t perform that action at this time.
0 commit comments