mirror of
https://github.com/ToolJet/ToolJet
synced 2026-05-24 01:18:23 +00:00
cleanup
This commit is contained in:
parent
b58188b63c
commit
fb6bf5a157
1 changed files with 15 additions and 3 deletions
|
|
@ -29,7 +29,6 @@ import {
|
|||
removeSelectedComponent,
|
||||
buildAppDefinition,
|
||||
buildComponentMetaDefinition,
|
||||
runQueries,
|
||||
} from '@/_helpers/appUtils';
|
||||
import { Confirm } from './Viewer/Confirm';
|
||||
import { Tooltip as ReactTooltip } from 'react-tooltip';
|
||||
|
|
@ -405,7 +404,6 @@ const EditorComponent = (props) => {
|
|||
};
|
||||
|
||||
const fetchDataQueries = async (id, selectFirstQuery = false, runQueriesOnAppLoad = false) => {
|
||||
// // editorRef can be undefined when runQueriesOnAppLoad
|
||||
await useDataQueriesStore
|
||||
.getState()
|
||||
.actions.fetchDataQueries(id, selectFirstQuery, runQueriesOnAppLoad, getEditorRef());
|
||||
|
|
@ -1009,8 +1007,22 @@ const EditorComponent = (props) => {
|
|||
setUndoStack((prev) => prev.slice(0, prev.length - 1));
|
||||
setRedoStack((prev) => [...prev, diffToPatches(_diffPatches)]);
|
||||
|
||||
let undoOpts = optsStack.undo[optsStack.undo.length - 1];
|
||||
|
||||
if (undoOpts?.componentDeleted) {
|
||||
undoOpts = {
|
||||
componentAdded: true,
|
||||
};
|
||||
}
|
||||
|
||||
if (undoOpts?.componentAdded) {
|
||||
undoOpts = {
|
||||
componentDeleted: true,
|
||||
};
|
||||
}
|
||||
|
||||
updateState({
|
||||
appDiffOptions: optsStack.undo[optsStack.undo.length - 1],
|
||||
appDiffOptions: undoOpts,
|
||||
});
|
||||
|
||||
setOptsStack((prev) => ({
|
||||
|
|
|
|||
Loading…
Reference in a new issue