1
0
Fork 0
mirror of synced 2024-07-01 12:30:41 +12:00

Prevent bindings from being used when filtering tables in the data UI

This commit is contained in:
Andrew Kingston 2021-09-29 09:18:08 +01:00
parent 98341b7237
commit 43eac99730
2 changed files with 8 additions and 2 deletions

View file

@ -30,7 +30,11 @@
onConfirm={() => dispatch("change", tempValue)}
>
<div class="wrapper">
<FilterDrawer bind:filters={tempValue} {schemaFields} />
<FilterDrawer
allowBindings={false}
bind:filters={tempValue}
{schemaFields}
/>
</div>
</ModalContent>
</Modal>

View file

@ -19,12 +19,14 @@
export let filters = []
export let bindings = []
export let panel = BindingPanel
export let allowBindings = true
const BannedTypes = ["link", "attachment", "formula"]
$: fieldOptions = (schemaFields ?? [])
.filter(field => !BannedTypes.includes(field.type))
.map(field => field.name)
$: valueTypeOptions = allowBindings ? ["Value", "Binding"] : ["Value"]
const addFilter = () => {
filters = [
@ -117,7 +119,7 @@
/>
<Select
disabled={filter.noValue || !filter.field}
options={["Value", "Binding"]}
options={valueTypeOptions}
bind:value={filter.valueType}
placeholder={null}
/>