Handle has any

This commit is contained in:
Adria Navarro 2023-10-03 13:51:06 +02:00
parent 0834d33f9a
commit 614bbb0412
2 changed files with 9 additions and 4 deletions

View File

@ -306,6 +306,8 @@
{:else if filter.type === FieldType.BB_REFERENCE} {:else if filter.type === FieldType.BB_REFERENCE}
<FilterUsers <FilterUsers
bind:value={filter.value} bind:value={filter.value}
multiselect={filter.operator ===
OperatorOptions.ContainsAny.value}
disabled={filter.noValue} disabled={filter.noValue}
/> />
{:else} {:else}

View File

@ -1,12 +1,12 @@
<script> <script>
import { Select } from "@budibase/bbui" import { Select, Multiselect } from "@budibase/bbui"
import { fetchData } from "@budibase/frontend-core" import { fetchData } from "@budibase/frontend-core"
import { API } from "api" import { API } from "api"
export let value = null export let value = null
export let disabled export let disabled
export let multiple = false export let multiselect = false
$: fetch = fetchData({ $: fetch = fetchData({
API, API,
@ -29,10 +29,13 @@
} }
} }
$: selectedValue = multiple || !value ? value : value[0] $: selectedValue = multiselect || !value ? value : value[0]
$: component = multiselect ? Multiselect : Select
</script> </script>
<Select <svelte:component
this={component}
value={selectedValue} value={selectedValue}
autocomplete autocomplete
on:change={onChange} on:change={onChange}