Tidy up
This commit is contained in:
parent
51db5ac9a9
commit
47e4c668ec
|
@ -5,7 +5,7 @@
|
|||
import { memo } from "@budibase/frontend-core"
|
||||
|
||||
const component = getContext("component")
|
||||
const { styleable, builderStore } = getContext("sdk")
|
||||
const { styleable } = getContext("sdk")
|
||||
const context = getContext("context")
|
||||
|
||||
let width
|
||||
|
@ -127,7 +127,7 @@
|
|||
data-cols={GridColumns}
|
||||
data-col-size={colSize}
|
||||
>
|
||||
{#if $builderStore.inBuilder}
|
||||
{#if inBuilder}
|
||||
<div class="underlay">
|
||||
{#each { length: GridColumns * rows } as _, idx}
|
||||
<div class="placeholder" class:first-col={idx % GridColumns === 0} />
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
// Offset = 6 (clip-root padding) - 1 (half the border thickness)
|
||||
const config = memo($$props)
|
||||
const errorColor = "var(--spectrum-global-color-static-red-600)"
|
||||
const observer = new MutationObserver(() => debouncedUpdate())
|
||||
const defaultState = () => ({
|
||||
// Cached props
|
||||
componentId,
|
||||
|
@ -54,8 +55,6 @@
|
|||
// Observe style changes
|
||||
$: observeChanges(componentId)
|
||||
|
||||
const observer = new MutationObserver(() => debouncedUpdate())
|
||||
|
||||
const observeChanges = id => {
|
||||
observer.disconnect()
|
||||
observing = false
|
||||
|
|
|
@ -135,6 +135,9 @@ export const gridLayout = (node, metadata) => {
|
|||
addDataTag("gridMobileHAlign", Devices.Mobile, GridParams.HAlign)
|
||||
addDataTag("gridDesktopVAlign", Devices.Desktop, GridParams.VAlign)
|
||||
addDataTag("gridMobileVAlign", Devices.Mobile, GridParams.VAlign)
|
||||
if (node.dataset.insideGrid !== true) {
|
||||
node.dataset.insideGrid = true
|
||||
}
|
||||
|
||||
// Apply all CSS variables to the wrapper
|
||||
node.style = buildStyleString(vars)
|
||||
|
|
Loading…
Reference in New Issue