diff --git a/editor/src/components/canvas/canvas-strategies/strategies/flex-reparent-to-absolute-strategy.tsx b/editor/src/components/canvas/canvas-strategies/strategies/flex-reparent-to-absolute-strategy.tsx index b36ceb998322..60941a9865e5 100644 --- a/editor/src/components/canvas/canvas-strategies/strategies/flex-reparent-to-absolute-strategy.tsx +++ b/editor/src/components/canvas/canvas-strategies/strategies/flex-reparent-to-absolute-strategy.tsx @@ -1,6 +1,7 @@ import { canvasPoint } from '../../../../core/shared/math-utils' import type { EditorStatePatch } from '../../../editor/store/editor-state' import { foldAndApplyCommandsInner } from '../../commands/commands' +import { setElementsToRerenderCommand } from '../../commands/set-elements-to-rerender-command' import { updateFunctionCommand } from '../../commands/update-function-command' import { ParentBounds } from '../../controls/parent-bounds' import { ParentOutlines } from '../../controls/parent-outlines' @@ -104,6 +105,10 @@ export function baseFlexReparentToAbsoluteStrategy( [ ...placeholderCommands.commands, ...escapeHatchCommands, + setElementsToRerenderCommand([ + newParent.intendedParentPath, + ...filteredSelectedElements, + ]), updateFunctionCommand( 'always', (editorState, commandLifecycle): Array => { diff --git a/editor/src/components/canvas/canvas-strategies/strategies/grid-reparent-strategy.tsx b/editor/src/components/canvas/canvas-strategies/strategies/grid-reparent-strategy.tsx index 6af2b2f095a9..24bb761a39f2 100644 --- a/editor/src/components/canvas/canvas-strategies/strategies/grid-reparent-strategy.tsx +++ b/editor/src/components/canvas/canvas-strategies/strategies/grid-reparent-strategy.tsx @@ -49,6 +49,7 @@ import type { ReparentTarget } from './reparent-helpers/reparent-strategy-helper import { getReparentOutcome, pathToReparent } from './reparent-utils' import { flattenSelection } from './shared-move-strategies-helpers' import type { GridCellCoordinates } from './grid-cell-bounds' +import { setElementsToRerenderCommand } from '../../commands/set-elements-to-rerender-command' export function gridReparentStrategy( reparentTarget: ReparentTarget, @@ -258,6 +259,7 @@ export function applyGridReparent( updateSelectedViews('always', newPaths), setCursorCommand(CSSCursor.Reparent), showGridControls('mid-interaction', reparentTarget.newParent.intendedParentPath), + setElementsToRerenderCommand(elementsToRerender), ], { elementsToRerender: elementsToRerender,