Binding drawer fixes
This commit is contained in:
parent
99ca0a0c4a
commit
b2633dc2db
|
@ -76,6 +76,10 @@ export function getBindings({
|
|||
// will be replaced by the main array binding
|
||||
readableBinding: label,
|
||||
runtimeBinding: binding,
|
||||
display: {
|
||||
name: label,
|
||||
type: field.name === FIELDS.LINK.name ? "Array" : field.name,
|
||||
},
|
||||
})
|
||||
}
|
||||
return bindings
|
||||
|
|
|
@ -339,25 +339,29 @@
|
|||
</Tab>
|
||||
{/if}
|
||||
<div class="drawer-actions">
|
||||
<Button
|
||||
secondary
|
||||
quiet
|
||||
on:click={() => {
|
||||
store.actions.settings.propertyFocus(null)
|
||||
drawerActions.hide()
|
||||
}}
|
||||
>
|
||||
Cancel
|
||||
</Button>
|
||||
<Button
|
||||
cta
|
||||
disabled={!valid}
|
||||
on:click={() => {
|
||||
bindingDrawerActions.save()
|
||||
}}
|
||||
>
|
||||
Save
|
||||
</Button>
|
||||
{#if drawerActions?.hide}
|
||||
<Button
|
||||
secondary
|
||||
quiet
|
||||
on:click={() => {
|
||||
store.actions.settings.propertyFocus(null)
|
||||
drawerActions.hide()
|
||||
}}
|
||||
>
|
||||
Cancel
|
||||
</Button>
|
||||
{/if}
|
||||
{#if bindingDrawerActions?.save}
|
||||
<Button
|
||||
cta
|
||||
disabled={!valid}
|
||||
on:click={() => {
|
||||
bindingDrawerActions.save()
|
||||
}}
|
||||
>
|
||||
Save
|
||||
</Button>
|
||||
{/if}
|
||||
</div>
|
||||
</Tabs>
|
||||
</div>
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
.map(([name, categoryBindings]) => ({
|
||||
name,
|
||||
bindings: categoryBindings?.filter(binding => {
|
||||
return binding.readableBinding.match(searchRgx)
|
||||
return !search || binding.readableBinding.match(searchRgx)
|
||||
}),
|
||||
}))
|
||||
.filter(category => {
|
||||
|
@ -46,7 +46,11 @@
|
|||
)
|
||||
})
|
||||
$: 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) => {
|
||||
|
@ -124,9 +128,6 @@
|
|||
<span
|
||||
class="search-input-icon"
|
||||
on:click={() => {
|
||||
if (!search) {
|
||||
return
|
||||
}
|
||||
search = null
|
||||
}}
|
||||
class:searching={search}
|
||||
|
|
Loading…
Reference in New Issue