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 = {
) => void;
fetchGenomeData: (genomeId: string) => void;
replace: Replace;
toggleDrawer: (drawerOpened: { [genomeId: string]: boolean }) => void;
toggleDrawer: (drawerOpened: boolean) => void;
setDataFromUrlAndSave: (payload: ParsedUrlPayload) => void;
};
......@@ -258,7 +258,7 @@ export const Browser: FunctionComponent<BrowserProps> = (
return;
}
props.toggleDrawer({ [props.activeGenomeId]: false });
props.toggleDrawer(false);
};
const [trackAnimation, setTrackAnimation] = useSpring(() => ({
......
......@@ -50,7 +50,7 @@ type StateProps = {
type DispatchProps = {
selectBrowserTabAndSave: (selectedBrowserTab: TrackType) => void;
toggleBrowserNav: () => void;
toggleDrawer: (drawerOpened: { [genomeId: string]: boolean }) => void;
toggleDrawer: (drawerOpened: boolean) => void;
toggleGenomeSelector: (genomeSelectorActive: boolean) => void;
};
......
......@@ -11,7 +11,7 @@ type BrowserTabsProps = {
genomeSelectorActive: boolean;
selectBrowserTabAndSave: (selectedBrowserTab: TrackType) => void;
selectedBrowserTab: { [genomeId: string]: TrackType };
toggleDrawer: (drawerOpened: { [genomeId: string]: boolean }) => void;
toggleDrawer: (drawerOpened: boolean) => void;
trackPanelModalOpened: boolean;
};
......@@ -26,7 +26,7 @@ const BrowserTabs: FunctionComponent<BrowserTabsProps> = (
}
if (drawerOpenedForGenome === true) {
props.toggleDrawer({ [props.activeGenomeId]: false });
props.toggleDrawer(false);
}
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