mirror of
https://github.com/ToolJet/ToolJet
synced 2026-05-24 09:28:31 +00:00
fixes: moving components via keyboard should update the editor
This commit is contained in:
parent
5d48385d50
commit
291bd29ff9
2 changed files with 5 additions and 1 deletions
|
|
@ -189,7 +189,7 @@ export const Container = ({
|
|||
} else {
|
||||
const diffState = diff(components, boxes);
|
||||
|
||||
if (!_.isEmpty(diffState) && !isOnlyLayoutUpdate(diffState)) {
|
||||
if (!_.isEmpty(diffState)) {
|
||||
setBoxes(components);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1290,7 +1290,9 @@ const EditorComponent = (props) => {
|
|||
const _appDefinition = JSON.parse(JSON.stringify(appDefinition));
|
||||
let newComponents = _appDefinition?.pages[currentPageId].components;
|
||||
const selectedComponents = useEditorStore.getState()?.selectedComponents;
|
||||
const componentsIds = [];
|
||||
for (const selectedComponent of selectedComponents) {
|
||||
componentsIds.push(selectedComponent.id);
|
||||
let top = newComponents[selectedComponent.id].layouts[currentLayout].top;
|
||||
let left = newComponents[selectedComponent.id].layouts[currentLayout].left;
|
||||
const width = newComponents[selectedComponent.id]?.layouts[currentLayout]?.width;
|
||||
|
|
@ -1327,6 +1329,8 @@ const EditorComponent = (props) => {
|
|||
_appDefinition.pages[currentPageId].components = newComponents;
|
||||
|
||||
appDefinitionChanged(_appDefinition, { containerChanges: true, widgetMovedWithKeyboard: true });
|
||||
// console.log('arpit::', { componentsIds });
|
||||
// updateComponentsNeedsUpdateOnNextRender(componentsIds);
|
||||
};
|
||||
|
||||
const copyComponents = () =>
|
||||
|
|
|
|||
Loading…
Reference in a new issue