speed up navigation to/from drawers

This commit is contained in:
Collin M. Barrett 2019-08-26 12:58:44 -05:00
parent 2b8ae9f9e2
commit 885513d96a
3 changed files with 5 additions and 5 deletions

View file

@ -12,6 +12,8 @@ export const ListDetailsButton = (props: RouteComponentProps & Props) =>
<Button
type="primary"
icon="info-circle"
onClick={() => props.history.push(`/lists/${props.list.id}`)}>
onClick={() => props.location.pathname === `/lists/${props.list.id}`
? props.history.push("/")
: props.history.push(`/lists/${props.list.id}`)}>
Details
</Button>;

View file

@ -38,6 +38,8 @@ export class ListDetailsDrawer extends React.Component<RouteComponentProps & Pro
return <Drawer
visible={true}
width={350}
placement={"left"}
mask={false}
title={this.props.list.name}
destroyOnClose={true}
onClose={() => this.props.history.push("/")}>

View file

@ -5,10 +5,6 @@ body {
sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
/* hacky fix for table-shift when details drawer is opened */
width: calc(100%) !important;
overflow: auto !important;
}
code {