Commit 6ac8f5c7 by Johannes Schill

Unmount component when fading out to reset its state, such as search..

parent 74b3a509
......@@ -5,6 +5,7 @@ interface Props {
duration: number;
children: JSX.Element;
in: boolean;
unmountOnExit?: boolean;
}
export const FadeIn: SFC<Props> = props => {
......@@ -21,7 +22,7 @@ export const FadeIn: SFC<Props> = props => {
};
return (
<Transition in={props.in} timeout={props.duration}>
<Transition in={props.in} timeout={props.duration} unmountOnExit={props.unmountOnExit || false}>
{state => (
<div
style={{
......
......@@ -117,7 +117,7 @@ export class EditorTabBody extends PureComponent<Props, State> {
</div>
<div className="panel-editor__scroll">
<CustomScrollbar autoHide={false}>
<FadeIn in={isOpen} duration={200}>
<FadeIn in={isOpen} duration={200} unmountOnExit={true}>
<div className="panel-editor__toolbar-view">{openView && this.renderOpenView(openView)}</div>
</FadeIn>
<div className="panel-editor__content">
......
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