Is there a way to render a react component in setCustomPanels render function? I can’t find any examples or documentation on how to put anything there other than simple html node elements.
@maggiev would you be able to give an example of rendering a react element? The documentation only has the html element example. The following is the TS error I get that I cant seem to find a way around:
TS2345: Argument of type '{ tab: { dataElement: string; title: string; img: string; }; panel: { dataElement: string; render: () => () => Element; }; }' is not assignable to parameter of type '{ tab: { dataElement: string; title: string; img: string; }; panel: { dataElement: string; render: renderCustomPanel; }; }'.
The types returned by 'panel.render()' are incompatible between these types.
Type '() => Element' is missing the following properties from type 'HTMLElement': accessKey, accessKeyLabel, autocapitalize, dir, and 277 more.
I’m glad you found a solution. Not sure what didn’t work previously, could be a TS typing issue but here is a basic example of how to render with a react element.