mirror of
https://github.com/ToolJet/ToolJet
synced 2026-05-23 17:08:34 +00:00
fixes: cloning of widgets
This commit is contained in:
parent
8770bba3a0
commit
feae3c2f2d
1 changed files with 10 additions and 1 deletions
|
|
@ -1059,6 +1059,15 @@ const EditorComponent = (props) => {
|
|||
cloneComponents(selectedComponents, appDefinition, currentPageId, appDefinitionChanged, false, true);
|
||||
};
|
||||
|
||||
const cloningComponents = () => {
|
||||
if (isVersionReleased) {
|
||||
useAppVersionStore.getState().actions.enableReleasedVersionPopupState();
|
||||
|
||||
return;
|
||||
}
|
||||
cloneComponents(selectedComponents, appDefinition, currentPageId, appDefinitionChanged, true, false);
|
||||
};
|
||||
|
||||
const handleEditorEscapeKeyPress = () => {
|
||||
if (selectedComponents?.length > 0) {
|
||||
updateEditorState({
|
||||
|
|
@ -1673,7 +1682,7 @@ const EditorComponent = (props) => {
|
|||
<div className="editor-sidebar">
|
||||
<EditorKeyHooks
|
||||
moveComponents={moveComponents}
|
||||
cloneComponents={cloneComponents}
|
||||
cloneComponents={cloningComponents}
|
||||
copyComponents={copyComponents}
|
||||
cutComponents={cutComponents}
|
||||
handleEditorEscapeKeyPress={handleEditorEscapeKeyPress}
|
||||
|
|
|
|||
Loading…
Reference in a new issue