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.copyComponent = copyComponent(store)
store.addTemplatedComponent = addTemplatedComponent(store)
store.setDetailProp = setDetailProp(store)
store.setMetadataProp = setMetadataProp(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 => {
s.currentPreviewItem[name] = prop
return s

View File

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