diff --git a/packages/builder/src/builderStore/fetchBindableProperties.js b/packages/builder/src/builderStore/fetchBindableProperties.js index 469c357212..65cc861c50 100644 --- a/packages/builder/src/builderStore/fetchBindableProperties.js +++ b/packages/builder/src/builderStore/fetchBindableProperties.js @@ -83,6 +83,8 @@ const contextToBindables = (models, walkResult) => context => { readableBinding: `${context.instance._instanceName}.${context.model.label}.${key}`, }) + // see ModelViewSelect.svelte for the format of context.model + // ... this allows us to bind to Model scheams, or View schemas const model = models.find(m => m._id === context.model.modelId) const schema = context.model.isModel ? model.schema diff --git a/packages/builder/src/builderStore/replaceBindings.js b/packages/builder/src/builderStore/replaceBindings.js index 38cb67951d..ce2d5fe163 100644 --- a/packages/builder/src/builderStore/replaceBindings.js +++ b/packages/builder/src/builderStore/replaceBindings.js @@ -4,7 +4,7 @@ export function readableToRuntimeBinding(bindableProperties, textWithBindings) { // Find all instances of mustasche const boundValues = textWithBindings.match(CAPTURE_VAR_INSIDE_MUSTACHE) - // Replace with names: + // Replace readableBindings with runtimeBindings boundValues && boundValues.forEach(boundValue => { const binding = bindableProperties.find(({ readableBinding }) => { @@ -27,7 +27,7 @@ export function runtimeToReadableBinding(bindableProperties, textWithBindings) { textWithBindings.match(CAPTURE_VAR_INSIDE_MUSTACHE)) || [] - // Replace with names: + // Replace runtimeBindings with readableBindings: boundValues.forEach(v => { const binding = bindableProperties.find(({ runtimeBinding }) => { return v === `{{ ${runtimeBinding} }}` diff --git a/packages/builder/src/components/userInterface/EventsEditor/actions/SaveFields.svelte b/packages/builder/src/components/userInterface/EventsEditor/actions/SaveFields.svelte index d8870e6f18..230416fede 100644 --- a/packages/builder/src/components/userInterface/EventsEditor/actions/SaveFields.svelte +++ b/packages/builder/src/components/userInterface/EventsEditor/actions/SaveFields.svelte @@ -1,4 +1,5 @@