Skip to content

Commit

Permalink
[Kibana React] Fix Page Template solutionNav propagation
Browse files Browse the repository at this point in the history
  • Loading branch information
ari-aviran committed Mar 8, 2022
1 parent bf12417 commit 91e043b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ export const withSolutionNav = (WrappedComponent: ComponentType<KibanaPageTempla
const [isSideNavOpenOnDesktop, setisSideNavOpenOnDesktop] = useState(
!JSON.parse(String(localStorage.getItem(SOLUTION_NAV_COLLAPSED_KEY)))
);
const { solutionNav, children, isEmptyState, template } = props;
const { solutionNav, ...propagatedProps } = props;
const { children, isEmptyState, template } = propagatedProps;
const toggleOpenOnDesktop = () => {
setisSideNavOpenOnDesktop(!isSideNavOpenOnDesktop);
// Have to store it as the opposite of the default we want
Expand Down Expand Up @@ -61,7 +62,7 @@ export const withSolutionNav = (WrappedComponent: ComponentType<KibanaPageTempla
} as EuiPageSideBarProps; // needed because for some reason 'none' is not recognized as a valid value for paddingSize
return (
<WrappedComponent
{...props}
{...propagatedProps}
pageSideBar={pageSideBar}
pageSideBarProps={pageSideBarProps}
template={templateToUse}
Expand Down

0 comments on commit 91e043b

Please sign in to comment.