1
0
Fork 0
mirror of synced 2024-10-05 12:34:50 +13:00

bugfix: events broken after views added to binding

This commit is contained in:
Michael Shanks 2020-09-11 16:33:37 +01:00
parent ac72852563
commit 62db75eafb

View file

@ -60,14 +60,12 @@
const component = $store.components[instance._component] const component = $store.components[instance._component]
// component.context is the name of the prop that holds the modelId // component.context is the name of the prop that holds the modelId
const modelId = instance[component.context] const modelInfo = instance[component.context]
if (!modelId) return [] if (!modelInfo) return []
const model = $backendUiStore.models.find( const model = $backendUiStore.models.find(m => m._id === modelInfo.modelId)
m => m._id === instance[component.context] parameters.modelId = modelInfo.modelId
)
parameters.modelId = modelId
return Object.keys(model.schema) return Object.keys(model.schema)
} }