1
0
Fork 0
mirror of synced 2024-08-23 22:11:39 +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} {error}
{disabled} {disabled}
{readonly} {readonly}
{value} value={Array.isArray(value) ? value : [value]}
{options} {options}
{placeholder} {placeholder}
{sort} {sort}

View file

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

View file

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