Skip to content

How to set "default" help panel for a given page? #3075

Closed Answered by pcolmer
pcolmer asked this question in Q&A
Discussion options

You must be logged in to vote

I've found the answer. The HelpPanelProvider is wrapped around AppLayout and that, in turn, references code like this:

  const [toolsOpen, setToolsOpen] = useState(false);
  const [toolsContent, setToolsContent] = useState<React.ReactNode>(() => (
    <AppliancesViewInfo />
  ));
  const appLayout = useRef<AppLayoutProps.Ref>(null);
  const handleToolsContentChange = (content: React.ReactNode) => {
    setToolsOpen(true);
    setToolsContent(content);
    appLayout.current?.focusToolsClose();
  };

It is the initial value for setToolsContent that defines what opens when the user clicks on the "i" icon.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by pcolmer
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant