@@ -92,8 +92,8 @@ export class MenuProviderService {
9292 provider : AbstractMenuProvider ,
9393 sections : PartialMenuSection [ ]
9494 } , sectionIndex ) => {
95- providerWithSection . sections . forEach ( ( section ) => {
96- this . addSection ( providerWithSection . provider , section ) ;
95+ providerWithSection . sections . forEach ( ( section , index ) => {
96+ this . addSection ( providerWithSection . provider , section , index ) ;
9797 } ) ;
9898 return this . waitForMenu$ ( providerWithSection . provider . menuID ) ;
9999 } ) ;
@@ -156,8 +156,8 @@ export class MenuProviderService {
156156 provider : AbstractMenuProvider ,
157157 sections : PartialMenuSection [ ]
158158 } ) => {
159- providerWithSection . sections . forEach ( ( section ) => {
160- this . addSection ( providerWithSection . provider , section ) ;
159+ providerWithSection . sections . forEach ( ( section , index ) => {
160+ this . addSection ( providerWithSection . provider , section , index ) ;
161161 } ) ;
162162 return this . waitForMenu$ ( providerWithSection . provider . menuID ) ;
163163 } ) ;
@@ -172,12 +172,13 @@ export class MenuProviderService {
172172 * @param provider - The provider of the section which will be used to provide extra data to the section
173173 * @param section - The partial section to be added to the menus
174174 */
175- private addSection ( provider : AbstractMenuProvider , section : PartialMenuSection ) {
175+ private addSection ( provider : AbstractMenuProvider , section : PartialMenuSection , index : number ) {
176176 this . menuService . addSection ( provider . menuID , {
177177 ...section ,
178- id : section . id ?? `${ provider . menuProviderId } ` ,
178+ id : section . id ?? `${ provider . menuProviderId } _ ${ index } ` ,
179179 parentID : section . parentID ?? provider . parentID ,
180- index : section . index ?? provider . index ,
180+ index : provider . index ,
181+ active : section . active ?? true ,
181182 shouldPersistOnRouteChange : section . shouldPersistOnRouteChange ?? provider . shouldPersistOnRouteChange ,
182183 alwaysRenderExpandable : section . alwaysRenderExpandable ?? provider . alwaysRenderExpandable ,
183184 } ) ;
0 commit comments