-
|
I am wondering how to use the onRenderGroupHeader parameter with Nav? The Microsoft Fluent UI documentation has an example of custom header groups that do not collapse and have a different style, applied using onRenderGroupHeader. https://developer.microsoft.com/en-us/fluentui#/controls/web/nav Screenshot of the result below Is it possible to do the same thing with shiny.fluent? Below is a basic example of the Nav with my attempt at using onRenderGroupHeader commented out (because it doesn't work). |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
|
Hi @zilch42, The Hope this helps |
Beta Was this translation helpful? Give feedback.

Hi @zilch42,
The
onRenderHroupHeaderargument must be a function returning a React component, in your example it returns a function. To render HTML elements using this approach we can't use JSX as it won't be rendered. We need to explicitly useReact.createElement, it's first argument takes the type of HTML tag, second is it's props (herer it'snull), the third one are children. Please take a look at the example: