diff --git a/packages/frontend-core/src/components/FilterBuilder.svelte b/packages/frontend-core/src/components/FilterBuilder.svelte index 67bfca524d..5aef3d0fd0 100644 --- a/packages/frontend-core/src/components/FilterBuilder.svelte +++ b/packages/frontend-core/src/components/FilterBuilder.svelte @@ -148,101 +148,105 @@
- - {#if !filters?.length} - Add your first filter expression. - {:else} - - {/if} - - {#if filters?.length} -
- -
-
- {#each filters as filter} - onOperatorChange(filter)} - placeholder={null} - /> - {#if allowBindings} + {#if fieldOptions?.length} + + {#if !filters?.length} + Add your first filter expression. + {:else} + + {/if} + + {#if filters?.length} +
+ +
+
+ {#each filters as filter} onOperatorChange(filter)} placeholder={null} /> - {/if} - {#if allowBindings && filter.field && filter.valueType === "Binding"} - - {:else if [FieldType.STRING, FieldType.LONGFORM, FieldType.NUMBER, FieldType.BIGINT, FieldType.FORMULA].includes(filter.type)} - - {:else if filter.type === FieldType.ARRAY || (filter.type === FieldType.OPTIONS && filter.operator === SearchQueryOperators.ONE_OF)} - - {:else if filter.type === FieldType.OPTIONS} - - {:else if filter.type === FieldType.BOOLEAN} - - {:else if filter.type === FieldType.DATETIME} - - {:else} - - {/if} -
- duplicateFilter(filter.id)} - /> -
-
- removeFilter(filter.id)} - /> -
- {/each} + {#if allowBindings} + + {:else if filter.type === FieldType.ARRAY || (filter.type === FieldType.OPTIONS && filter.operator === SearchQueryOperators.ONE_OF)} + + {:else if filter.type === FieldType.OPTIONS} + + {:else if filter.type === FieldType.BOOLEAN} + + {:else if filter.type === FieldType.DATETIME} + + {:else} + + {/if} +
+ duplicateFilter(filter.id)} + /> +
+
+ removeFilter(filter.id)} + /> +
+ {/each} +
+ {/if} +
+
+ {:else} + None of the table column can be used for filtering. {/if} -
- -