Prevent bindings from being used when filtering tables in the data UI
This commit is contained in:
parent
98341b7237
commit
43eac99730
|
@ -30,7 +30,11 @@
|
||||||
onConfirm={() => dispatch("change", tempValue)}
|
onConfirm={() => dispatch("change", tempValue)}
|
||||||
>
|
>
|
||||||
<div class="wrapper">
|
<div class="wrapper">
|
||||||
<FilterDrawer bind:filters={tempValue} {schemaFields} />
|
<FilterDrawer
|
||||||
|
allowBindings={false}
|
||||||
|
bind:filters={tempValue}
|
||||||
|
{schemaFields}
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
</ModalContent>
|
</ModalContent>
|
||||||
</Modal>
|
</Modal>
|
||||||
|
|
|
@ -19,12 +19,14 @@
|
||||||
export let filters = []
|
export let filters = []
|
||||||
export let bindings = []
|
export let bindings = []
|
||||||
export let panel = BindingPanel
|
export let panel = BindingPanel
|
||||||
|
export let allowBindings = true
|
||||||
|
|
||||||
const BannedTypes = ["link", "attachment", "formula"]
|
const BannedTypes = ["link", "attachment", "formula"]
|
||||||
|
|
||||||
$: fieldOptions = (schemaFields ?? [])
|
$: fieldOptions = (schemaFields ?? [])
|
||||||
.filter(field => !BannedTypes.includes(field.type))
|
.filter(field => !BannedTypes.includes(field.type))
|
||||||
.map(field => field.name)
|
.map(field => field.name)
|
||||||
|
$: valueTypeOptions = allowBindings ? ["Value", "Binding"] : ["Value"]
|
||||||
|
|
||||||
const addFilter = () => {
|
const addFilter = () => {
|
||||||
filters = [
|
filters = [
|
||||||
|
@ -117,7 +119,7 @@
|
||||||
/>
|
/>
|
||||||
<Select
|
<Select
|
||||||
disabled={filter.noValue || !filter.field}
|
disabled={filter.noValue || !filter.field}
|
||||||
options={["Value", "Binding"]}
|
options={valueTypeOptions}
|
||||||
bind:value={filter.valueType}
|
bind:value={filter.valueType}
|
||||||
placeholder={null}
|
placeholder={null}
|
||||||
/>
|
/>
|
||||||
|
|
Loading…
Reference in New Issue