Parcourir la source

Fixed a small bug when toggling items in toolbar

Hugo Häggmark il y a 7 ans
Parent
commit
67e8958aec
1 fichiers modifiés avec 1 ajouts et 1 suppressions
  1. 1 1
      public/app/features/dashboard/dashgrid/EditorTabBody.tsx

+ 1 - 1
public/app/features/dashboard/dashgrid/EditorTabBody.tsx

@@ -52,7 +52,7 @@ export class EditorTabBody extends PureComponent<Props, State> {
   onToggleToolBarView = (item: EditorToolbarView) => {
     this.setState({
       openView: item,
-      isOpen: !this.state.isOpen,
+      isOpen: this.state.openView !== item ? true : !this.state.isOpen,
     });
   };