Skip to content

Commit

Permalink
feat: close sidebar on workload collapse
Browse files Browse the repository at this point in the history
  • Loading branch information
Kav91 committed Dec 16, 2022
1 parent bc21e2b commit 05c3864
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions nerdlets/results-beta/components/resultPanel/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ export default function ResultsPanel(props) {
workloadData,
costSummary,
fetchingWorkloadData,
entitySideBarOpen
entitySideBarOpen,
updateDataState
} = dataContext;
// eslint-disable-next-line
const [view, setView] = useState('cost');
Expand Down Expand Up @@ -155,9 +156,10 @@ export default function ResultsPanel(props) {
<Card
collapsible
defaultCollapsed
onChange={(e, collapsed) =>
setState({ [wl]: collapsed })
}
onChange={(e, collapsed) => {
setState({ [wl]: collapsed });
updateDataState({ entitySideBarOpen: null });
}}
>
<CardHeader
style={{
Expand Down

0 comments on commit 05c3864

Please sign in to comment.