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) => {
153153 if ( hidden ) {
154154 return null ;
155155 }
156- const visibleSubItems = items . filter ( ( item ) => ! item . children . hidden . getView ( ) ) ;
157156 const subMenuItems : Array < { key : string ; label : string } > = [ ] ;
158157 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 + "" ;
161163 subItem . children . active . getView ( ) && subMenuSelectedKeys . push ( key ) ;
162164 subMenuItems . push ( {
163165 key : key ,
@@ -184,7 +186,7 @@ const NavCompBase = new UICompBuilder(childrenMap, (props) => {
184186 { items . length > 0 && < DownOutlined /> }
185187 </ Item >
186188 ) ;
187- if ( visibleSubItems . length > 0 ) {
189+ if ( subMenuItems . length > 0 ) {
188190 const subMenu = (
189191 < StyledMenu
190192 onClick = { ( e ) => {
You can’t perform that action at this time.
0 commit comments