1
0
Fork 0
mirror of synced 2024-07-03 13:30:46 +12:00
This commit is contained in:
mike12345567 2021-01-22 17:58:01 +00:00
parent d3d840e42a
commit 1d38dda79b
4 changed files with 21 additions and 8 deletions

View file

@ -106,7 +106,9 @@ export const getContextBindings = (rootComponent, componentId) => {
contextBindings.push({
type: "context",
runtimeBinding: `${makePropSafe(component._id)}.${makePropSafe(runtimeBoundKey)}`,
runtimeBinding: `${makePropSafe(component._id)}.${makePropSafe(
runtimeBoundKey
)}`,
readableBinding: `${component._instanceName}.${table.name}.${key}`,
fieldSchema,
providerId: component._id,

View file

@ -78,15 +78,19 @@
bind:value
placeholder="Add options from the left, type text, or do both" />
{#if !validity}
<p class="syntax-error">Current Handlebars syntax is invalid, please check the guide
<a href="https://handlebarsjs.com/guide/">here</a> for more details.
<p class="syntax-error">
Current Handlebars syntax is invalid, please check the guide
<a href="https://handlebarsjs.com/guide/">here</a>
for more details.
</p>
{/if}
<div class="controls">
<a href="https://docs.budibase.com/design/binding">
<Body small>Learn more about binding</Body>
</a>
<Button on:click={popover.hide} disabled={!validity} primary>Done</Button>
<Button on:click={popover.hide} disabled={!validity} primary>
Done
</Button>
</div>
</div>
</div>

View file

@ -3,7 +3,10 @@
import { Button, TextArea, Drawer, Heading, Spacer } from "@budibase/bbui"
import { createEventDispatcher } from "svelte"
import { isValid } from "@budibase/string-templates"
import {getBindableProperties, readableToRuntimeBinding} from "builderStore/dataBinding"
import {
getBindableProperties,
readableToRuntimeBinding,
} from "builderStore/dataBinding"
import { currentAsset, store } from "../../../builderStore"
const dispatch = createEventDispatcher()
@ -73,8 +76,10 @@
placeholder="Add text, or click the objects on the left to add them to the
textbox." />
{#if !validity}
<p class="syntax-error">Current Handlebars syntax is invalid, please check the guide
<a href="https://handlebarsjs.com/guide/">here</a> for more details.
<p class="syntax-error">
Current Handlebars syntax is invalid, please check the guide
<a href="https://handlebarsjs.com/guide/">here</a>
for more details.
</p>
{/if}
</div>

View file

@ -22,7 +22,9 @@ module.exports.preprocess = (string, finalise = true) => {
// the pre-processor finalisation stops handlebars from ever throwing an error
// might want to pre-process for other benefits but still want to see errors
if (!finalise) {
processors = processors.filter(processor => processor.name !== preprocessor.PreprocessorNames.FINALISE)
processors = processors.filter(
processor => processor.name !== preprocessor.PreprocessorNames.FINALISE
)
}
return process(string, processors)
}