Merge pull request #14434 from grafana/14274-reset-search

14274 develop - Reset DsPicker and VizPicker state when closed
This commit is contained in:
Torkel Ödegaard 2018-12-11 09:14:41 +01:00 committed by GitHub
commit 75a1536c91
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 2 deletions

View File

@ -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={{

View File

@ -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">