From f16fa82e290e34ac325e849e13ff76e15db8755d Mon Sep 17 00:00:00 2001 From: Alan Greene Date: Wed, 21 Apr 2021 13:20:24 +0100 Subject: [PATCH] Fix for SideNav not collapsing when toggling the menu button The `expanded` prop of the `SideNav` component was incorrectly set as an object instead of a boolean, preventing the nav from being collapsed. Fix the state update so it's providing a boolean as expected. --- .../components/src/components/LabelFilter/LabelFilter.js | 2 +- src/containers/App/App.js | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/components/src/components/LabelFilter/LabelFilter.js b/packages/components/src/components/LabelFilter/LabelFilter.js index 5e3785370..80bb2656e 100644 --- a/packages/components/src/components/LabelFilter/LabelFilter.js +++ b/packages/components/src/components/LabelFilter/LabelFilter.js @@ -151,7 +151,7 @@ class LabelFilter extends Component { )}
{ - setIsSideNavExpanded(prevIsSideNavExpanded => ({ - isSideNavExpanded: !prevIsSideNavExpanded - })); + setIsSideNavExpanded( + prevIsSideNavExpanded => !prevIsSideNavExpanded + ); }} />