diff --git a/packages/client/src/components/Component.svelte b/packages/client/src/components/Component.svelte index e793adff23..69ea0367ab 100644 --- a/packages/client/src/components/Component.svelte +++ b/packages/client/src/components/Component.svelte @@ -207,8 +207,7 @@ } // Metadata to pass into grid action to apply CSS - let gridMetadata = memo() - $: gridMetadata.set({ + $: gridMetadata = { insideGrid: parent?._component.endsWith("/container") && parent?.layout === "grid", ignoresLayout: definition?.ignoresLayout === true, @@ -218,7 +217,7 @@ draggable, definition, errored: errorState, - }) + } // Update component context $: store.set({ @@ -674,7 +673,7 @@ data-name={name} data-icon={icon} data-parent={$component.id} - use:gridLayout={$gridMetadata} + use:gridLayout={gridMetadata} > {#if errorState} { } // Determine default width and height of component - let width = errored ? 500 : definition.size?.width || 200 - let height = errored ? 60 : definition.size?.height || 200 + let width = errored ? 500 : definition?.size?.width || 200 + let height = errored ? 60 : definition?.size?.height || 200 width += 2 * GridSpacing height += 2 * GridSpacing let vars = {