PanelEditor: leave table view when changing the other display modes (#33826)

This commit is contained in:
Ryan McKinley 2021-05-09 22:19:52 -07:00 committed by GitHub
parent 98f59cfcba
commit 1e6eb70af0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -218,6 +218,9 @@ export class PanelEditorUnconnected extends PureComponent<Props> {
onDisplayModeChange = (mode?: DisplayMode) => { onDisplayModeChange = (mode?: DisplayMode) => {
const { updatePanelEditorUIState } = this.props; const { updatePanelEditorUIState } = this.props;
if (this.props.tableViewEnabled) {
this.props.toggleTableView();
}
updatePanelEditorUIState({ updatePanelEditorUIState({
mode: mode, mode: mode,
}); });