Skip to content

Commit

Permalink
Move the sidebar closed call
Browse files Browse the repository at this point in the history
  • Loading branch information
zlwaterfield committed Mar 14, 2024
1 parent a045934 commit bfb6e87
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -64,12 +64,11 @@ export const sidePanelStateLogic = kea<sidePanelStateLogicType>([
actions.setSidePanelOpen(true)
},
closeSidePanel: ({ tab }) => {
actions.reportActivationSideBarClosed(tab)
if (!tab) {
actions.reportActivationSideBarClosed()
// If we aren't specifiying the tab we always close
actions.setSidePanelOpen(false)
} else if (values.selectedTab === tab) {
actions.reportActivationSideBarClosed(tab)
// Otherwise we only close it if the tab is the currently open one
actions.setSidePanelOpen(false)
}
Expand Down

0 comments on commit bfb6e87

Please sign in to comment.