Fix issue where grid styles are not reapplied when component visibility changes
This commit is contained in:
parent
84db937cba
commit
fedb592b92
|
@ -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}
|
||||
<ComponentErrorState
|
||||
|
|
|
@ -92,8 +92,8 @@ export const gridLayout = (node, metadata) => {
|
|||
}
|
||||
|
||||
// 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 = {
|
||||
|
|
Loading…
Reference in New Issue