Pergunta

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?

Foi útil?

Solução

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...

Licenciado em: CC-BY-SA com atribuição
Não afiliado a sharepoint.stackexchange
scroll top