Rename detailProp to metadataProp

This commit is contained in:
pngwn 2020-02-26 12:45:20 +00:00
parent 862a32af9b
commit 2d1dc5bdb3
2 changed files with 3 additions and 4 deletions

View File

@ -112,7 +112,7 @@ export const getStore = () => {
store.moveDownComponent = moveDownComponent(store) store.moveDownComponent = moveDownComponent(store)
store.copyComponent = copyComponent(store) store.copyComponent = copyComponent(store)
store.addTemplatedComponent = addTemplatedComponent(store) store.addTemplatedComponent = addTemplatedComponent(store)
store.setDetailProp = setDetailProp(store) store.setMetadataProp = setMetadataProp(store)
return store return store
} }
@ -956,7 +956,7 @@ const walkProps = (props, action, cancelToken = null) => {
} }
} }
const setDetailProp = store => (name, prop) => { const setMetadataProp = store => (name, prop) => {
store.update(s => { store.update(s => {
s.currentPreviewItem[name] = prop s.currentPreviewItem[name] = prop
return s return s

View File

@ -36,7 +36,6 @@
function getProps(obj, keys) { function getProps(obj, keys) {
return keys.map((k, i) => [k, obj[k], obj.props._id + i]) return keys.map((k, i) => [k, obj[k], obj.props._id + i])
} }
$: console.log($store, component)
</script> </script>
<div class="root"> <div class="root">
@ -87,7 +86,7 @@
<input <input
id={k} id={k}
value={v} value={v}
on:input={({ target }) => store.setDetailProp(k, target.value)} /> on:input={({ target }) => store.setMetadataProp(k, target.value)} />
</div> </div>
{/each} {/each}
<PropsView {component} {components} {onPropChanged} /> <PropsView {component} {components} {onPropChanged} />