fix: screen settings not updating
This commit is contained in:
parent
67b99ec5d8
commit
74115bb2c9
|
@ -41,14 +41,6 @@
|
|||
|
||||
const onStyleChanged = store.setComponentStyle
|
||||
|
||||
function onPropChanged(key, value) {
|
||||
if ($store.currentView !== "component") {
|
||||
store.setPageOrScreenProp(key, value)
|
||||
return
|
||||
}
|
||||
store.setComponentProp(key, value)
|
||||
}
|
||||
|
||||
$: isComponentOrScreen =
|
||||
$store.currentView === "component" ||
|
||||
$store.currentFrontEndType === "screen"
|
||||
|
@ -103,7 +95,8 @@
|
|||
{componentDefinition}
|
||||
{panelDefinition}
|
||||
displayNameField={displayName}
|
||||
onChange={onPropChanged}
|
||||
onChange={store.setComponentProp}
|
||||
onScreenPropChange={store.setPageOrScreenProp}
|
||||
screenOrPageInstance={$store.currentView !== 'component' && $store.currentPreviewItem} />
|
||||
{/if}
|
||||
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
export let componentDefinition = {}
|
||||
export let componentInstance = {}
|
||||
export let onChange = () => {}
|
||||
export let onScreenPropChange = () => {}
|
||||
export let displayNameField = false
|
||||
export let screenOrPageInstance
|
||||
|
||||
|
@ -91,7 +92,7 @@
|
|||
label={def.label}
|
||||
key={def.key}
|
||||
value={screenOrPageInstance[def.key]}
|
||||
{onChange}
|
||||
onChange={onScreenPropChange}
|
||||
props={{ ...excludeProps(def, ['control', 'label']) }} />
|
||||
{/each}
|
||||
<hr />
|
||||
|
|
Loading…
Reference in New Issue