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} {datasource}
{allowBindings} {allowBindings}
> >
<div slot="filteringHeroContent" /> <div slot="filtering-hero-content" />
<DrawerBindableInput <DrawerBindableInput
let:filter let:filter

View File

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