0

I try to build a navigation with spfx. Its working fine but I want to have the navigation collapsed. It seems that the property is not assigned or recognized by SPFx (it is running but with no effect).

My navigation element:

<Nav
  groups={ this.state.groupedPages }
/>

And the groupedPages-object:

Navigation object

Is there something I'm doing wrong?

  • are you implementing the INavLinkGroup interface ? Just looked at it, it doesnt have url property. Any console errors ? – Gautam Sheth Apr 25 '18 at 11:04
  • It has the url property (in the screenshot: at the bottom). And yes I implementing the INavLinkGroup. Unfortunately no console errors... – Oskar Apr 25 '18 at 11:58
0

After some try and error I found the "solution"

collapseByDefault is at this point completely lossless. You have to add to the group the following property to get it work.

isExpanded: true

Note: This seems not to apply to the root level of the Nav-component...

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.