Commit 10111976 authored by Imran Salam's avatar Imran Salam
Browse files

fix drawer not closing when clicked on browser tab and browser image

parent 3d6ecaff
Pipeline #26356 passed with stage
in 2 minutes and 14 seconds
...@@ -79,7 +79,7 @@ type DispatchProps = { ...@@ -79,7 +79,7 @@ type DispatchProps = {
) => void; ) => void;
fetchGenomeData: (genomeId: string) => void; fetchGenomeData: (genomeId: string) => void;
replace: Replace; replace: Replace;
toggleDrawer: (drawerOpened: { [genomeId: string]: boolean }) => void; toggleDrawer: (drawerOpened: boolean) => void;
setDataFromUrlAndSave: (payload: ParsedUrlPayload) => void; setDataFromUrlAndSave: (payload: ParsedUrlPayload) => void;
}; };
...@@ -258,7 +258,7 @@ export const Browser: FunctionComponent<BrowserProps> = ( ...@@ -258,7 +258,7 @@ export const Browser: FunctionComponent<BrowserProps> = (
return; return;
} }
props.toggleDrawer({ [props.activeGenomeId]: false }); props.toggleDrawer(false);
}; };
const [trackAnimation, setTrackAnimation] = useSpring(() => ({ const [trackAnimation, setTrackAnimation] = useSpring(() => ({
......
...@@ -50,7 +50,7 @@ type StateProps = { ...@@ -50,7 +50,7 @@ type StateProps = {
type DispatchProps = { type DispatchProps = {
selectBrowserTabAndSave: (selectedBrowserTab: TrackType) => void; selectBrowserTabAndSave: (selectedBrowserTab: TrackType) => void;
toggleBrowserNav: () => void; toggleBrowserNav: () => void;
toggleDrawer: (drawerOpened: { [genomeId: string]: boolean }) => void; toggleDrawer: (drawerOpened: boolean) => void;
toggleGenomeSelector: (genomeSelectorActive: boolean) => void; toggleGenomeSelector: (genomeSelectorActive: boolean) => void;
}; };
......
...@@ -11,7 +11,7 @@ type BrowserTabsProps = { ...@@ -11,7 +11,7 @@ type BrowserTabsProps = {
genomeSelectorActive: boolean; genomeSelectorActive: boolean;
selectBrowserTabAndSave: (selectedBrowserTab: TrackType) => void; selectBrowserTabAndSave: (selectedBrowserTab: TrackType) => void;
selectedBrowserTab: { [genomeId: string]: TrackType }; selectedBrowserTab: { [genomeId: string]: TrackType };
toggleDrawer: (drawerOpened: { [genomeId: string]: boolean }) => void; toggleDrawer: (drawerOpened: boolean) => void;
trackPanelModalOpened: boolean; trackPanelModalOpened: boolean;
}; };
...@@ -26,7 +26,7 @@ const BrowserTabs: FunctionComponent<BrowserTabsProps> = ( ...@@ -26,7 +26,7 @@ const BrowserTabs: FunctionComponent<BrowserTabsProps> = (
} }
if (drawerOpenedForGenome === true) { if (drawerOpenedForGenome === true) {
props.toggleDrawer({ [props.activeGenomeId]: false }); props.toggleDrawer(false);
} }
props.selectBrowserTabAndSave(value); props.selectBrowserTabAndSave(value);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment