From c974373f06f10b6ae46b0fcd926122dd4adc5073 Mon Sep 17 00:00:00 2001 From: Gandharv Date: Thu, 24 Mar 2022 21:01:24 +0500 Subject: [PATCH] fix: reset undo/redo actions on version change (#2574) --- frontend/src/Editor/Editor.jsx | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/frontend/src/Editor/Editor.jsx b/frontend/src/Editor/Editor.jsx index 9b462722a6..76ac694aa9 100644 --- a/frontend/src/Editor/Editor.jsx +++ b/frontend/src/Editor/Editor.jsx @@ -130,9 +130,6 @@ class Editor extends React.Component { }; this.autoSave = debounce(this.saveEditingVersion, 3000); - - // setup for closing versions dropdown on oustide click - this.wrapperRef = React.createRef(); } setWindowTitle(name) { @@ -343,6 +340,7 @@ class Editor extends React.Component { this.fetchDataSources(); this.fetchDataQueries(); + this.initComponentVersioning(); }; dataSourcesChanged = () => { @@ -456,12 +454,6 @@ class Editor extends React.Component { this.setState({ slug: newSlug }); }; - handleClickOutsideAppVersionsDropdown = (event) => { - if (this.wrapperRef && !this.wrapperRef.current.contains(event.target)) { - this.setState({ showAppVersionsDropdown: false }); - } - }; - removeComponent = (component) => { if (!this.isVersionReleased()) { let newDefinition = cloneDeep(this.state.appDefinition);