1
0
Fork 0
mirror of synced 2024-07-16 19:56:10 +12:00

Merge pull request #6990 from Budibase/feature/option-isin-filter

Add 'Is In' filter to Option data type
This commit is contained in:
melohagan 2022-07-29 17:36:42 +01:00 committed by GitHub
commit c095da4230
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 3 deletions

View file

@ -27,7 +27,7 @@
{error}
{disabled}
{readonly}
{value}
value={Array.isArray(value) ? value : [value]}
{options}
{placeholder}
{sort}

View file

@ -140,7 +140,7 @@
/>
{:else if ["string", "longform", "number", "formula"].includes(filter.type)}
<Input disabled={filter.noValue} bind:value={filter.value} />
{:else if filter.type === "array"}
{:else if filter.type === "array" || (filter.type === "options" && filter.operator === "oneOf")}
<Multiselect
disabled={filter.noValue}
options={getFieldOptions(filter.field)}

View file

@ -30,7 +30,7 @@ export const getValidOperatorsForType = type => {
} else if (type === "number") {
return numOps
} else if (type === "options") {
return [Op.Equals, Op.NotEquals, Op.Empty, Op.NotEmpty]
return [Op.Equals, Op.NotEquals, Op.Empty, Op.NotEmpty, Op.In]
} else if (type === "array") {
return [Op.Contains, Op.NotContains, Op.Empty, Op.NotEmpty, Op.ContainsAny]
} else if (type === "boolean") {