Browse Source
Merge pull request #6990 from Budibase/feature/option-isin-filter
Add 'Is In' filter to Option data type
pull/6931/head
melohagan
4 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with
3 additions and
3 deletions
-
packages/bbui/src/Form/Multiselect.svelte
-
packages/builder/src/components/design/settings/controls/FilterEditor/FilterDrawer.svelte
-
packages/frontend-core/src/utils/lucene.js
|
|
|
@ -27,7 +27,7 @@ |
|
|
|
{error} |
|
|
|
{disabled} |
|
|
|
{readonly} |
|
|
|
{value} |
|
|
|
value={Array.isArray(value) ? value : [value]} |
|
|
|
{options} |
|
|
|
{placeholder} |
|
|
|
{sort} |
|
|
|
|
|
|
|
@ -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)} |
|
|
|
|
|
|
|
@ -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") { |
|
|
|
|