Fix messaging

This commit is contained in:
Adria Navarro 2024-04-12 09:59:15 +02:00
parent 4b38220048
commit 88961986ae
3 changed files with 14 additions and 6 deletions

View File

@ -67,7 +67,7 @@
{datasource}
{allowBindings}
>
<div slot="filteringHeroContent" />
<div slot="filtering-hero-content" />
<DrawerBindableInput
let:filter

View File

@ -6,4 +6,9 @@
export let datasource
</script>
<FilterBuilder bind:filters {schemaFields} {datasource} />
<FilterBuilder bind:filters {schemaFields} {datasource} filtersLabel={null}>
<div slot="filtering-hero-content">
Results are filtered to only those which match all of the following
constraints.
</div>
</FilterBuilder>

View File

@ -24,6 +24,7 @@
export let datasource
export let behaviourFilters = false
export let allowBindings = false
export let filtersLabel = "Filters"
$: matchAny = filters?.find(filter => filter.operator === "allOr") != null
$: onEmptyFilter =
@ -184,7 +185,7 @@
{#if !fieldFilters?.length}
Add your first filter expression.
{:else}
<slot name="filteringHeroContent" />
<slot name="filtering-hero-content" />
{#if behaviourFilters}
<div class="behaviour-filters">
<Select
@ -213,9 +214,11 @@
</Body>
{#if fieldFilters?.length}
<div>
{#if filtersLabel}
<div class="filter-label">
<Label>Filters</Label>
<Label>{filtersLabel}</Label>
</div>
{/if}
<div class="fields" class:with-bindings={allowBindings}>
{#each fieldFilters as filter}
<Select