kgabryje commented on a change in pull request #10880:
URL:
https://github.com/apache/incubator-superset/pull/10880#discussion_r488721386
##########
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:
Sorry, I assumed that we use `withRouter` for pages that use
react-router - that would provide `history` object to props. However, do we
need to explicitly say that `DatasetList` and `DatasourceList` use router? I
think we only use them inside `<Router>` in `views/App` file, so maybe we could
drop `usesRouter` prop for them? Sorry if I confuse something, I'm new to the
project 🙂
----------------------------------------------------------------
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]