Merge pull request #10805 from Budibase/fix/bindings-fixes
Binding drawer fixes
This commit is contained in:
commit
d07746c787
5 changed files with 33 additions and 25 deletions
|
@ -76,6 +76,10 @@ export function getBindings({
|
||||||
// will be replaced by the main array binding
|
// will be replaced by the main array binding
|
||||||
readableBinding: label,
|
readableBinding: label,
|
||||||
runtimeBinding: binding,
|
runtimeBinding: binding,
|
||||||
|
display: {
|
||||||
|
name: label,
|
||||||
|
type: field.name === FIELDS.LINK.name ? "Array" : field.name,
|
||||||
|
},
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
return bindings
|
return bindings
|
||||||
|
|
|
@ -339,24 +339,28 @@
|
||||||
</Tab>
|
</Tab>
|
||||||
{/if}
|
{/if}
|
||||||
<div class="drawer-actions">
|
<div class="drawer-actions">
|
||||||
<Button
|
{#if drawerActions?.hide}
|
||||||
secondary
|
<Button
|
||||||
quiet
|
secondary
|
||||||
on:click={() => {
|
quiet
|
||||||
drawerActions.hide()
|
on:click={() => {
|
||||||
}}
|
drawerActions.hide()
|
||||||
>
|
}}
|
||||||
Cancel
|
>
|
||||||
</Button>
|
Cancel
|
||||||
<Button
|
</Button>
|
||||||
cta
|
{/if}
|
||||||
disabled={!valid}
|
{#if bindingDrawerActions?.save}
|
||||||
on:click={() => {
|
<Button
|
||||||
bindingDrawerActions.save()
|
cta
|
||||||
}}
|
disabled={!valid}
|
||||||
>
|
on:click={() => {
|
||||||
Save
|
bindingDrawerActions.save()
|
||||||
</Button>
|
}}
|
||||||
|
>
|
||||||
|
Save
|
||||||
|
</Button>
|
||||||
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
</Tabs>
|
</Tabs>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -36,7 +36,7 @@
|
||||||
.map(([name, categoryBindings]) => ({
|
.map(([name, categoryBindings]) => ({
|
||||||
name,
|
name,
|
||||||
bindings: categoryBindings?.filter(binding => {
|
bindings: categoryBindings?.filter(binding => {
|
||||||
return binding.readableBinding.match(searchRgx)
|
return !search || binding.readableBinding.match(searchRgx)
|
||||||
}),
|
}),
|
||||||
}))
|
}))
|
||||||
.filter(category => {
|
.filter(category => {
|
||||||
|
@ -46,7 +46,11 @@
|
||||||
)
|
)
|
||||||
})
|
})
|
||||||
$: filteredHelpers = helpers?.filter(helper => {
|
$: filteredHelpers = helpers?.filter(helper => {
|
||||||
return helper.label.match(searchRgx) || helper.description.match(searchRgx)
|
return (
|
||||||
|
!search ||
|
||||||
|
helper.label.match(searchRgx) ||
|
||||||
|
helper.description.match(searchRgx)
|
||||||
|
)
|
||||||
})
|
})
|
||||||
|
|
||||||
const getHelperExample = (helper, js) => {
|
const getHelperExample = (helper, js) => {
|
||||||
|
@ -124,9 +128,6 @@
|
||||||
<span
|
<span
|
||||||
class="search-input-icon"
|
class="search-input-icon"
|
||||||
on:click={() => {
|
on:click={() => {
|
||||||
if (!search) {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
search = null
|
search = null
|
||||||
}}
|
}}
|
||||||
class:searching={search}
|
class:searching={search}
|
||||||
|
|
|
@ -76,7 +76,7 @@
|
||||||
{/if}
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<Drawer bind:this={bindingDrawer} {title}>
|
<Drawer bind:this={bindingDrawer} {title} headless>
|
||||||
<svelte:fragment slot="description">
|
<svelte:fragment slot="description">
|
||||||
Add the objects on the left to enrich your text.
|
Add the objects on the left to enrich your text.
|
||||||
</svelte:fragment>
|
</svelte:fragment>
|
||||||
|
|
|
@ -186,7 +186,6 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
div :global(.CodeMirror) {
|
div :global(.CodeMirror) {
|
||||||
width: var(--code-mirror-width) !important;
|
|
||||||
height: var(--code-mirror-height) !important;
|
height: var(--code-mirror-height) !important;
|
||||||
border-radius: var(--border-radius-s);
|
border-radius: var(--border-radius-s);
|
||||||
font-family: var(--font-mono);
|
font-family: var(--font-mono);
|
||||||
|
|
Loading…
Reference in a new issue