kgabryje commented on a change in pull request #10880:
URL:
https://github.com/apache/incubator-superset/pull/10880#discussion_r488218415
##########
File path: superset-frontend/src/components/Menu/SubMenu.tsx
##########
@@ -66,6 +81,10 @@ export interface SubMenuProps {
name: string;
children?: MenuChild[];
activeChild?: MenuChild['name'];
+ /* If usesRouter is true, a react-router <Link> component will be used
instead of href.
+ * ONLY set usesRouter to true if SubMenu is wrapped in a react-router
<Router>;
+ * otherwise, a 'You should not use <Link> outside a <Router>' error will
be thrown */
+ usesRouter?: boolean;
Review comment:
What do you think about checking if `props.history` exists to determine
if we have access to react-router?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]