evidence-dev / evidence

Business intelligence as code: build fast, interactive data visualizations in pure SQL and markdown
https://evidence.dev
MIT License
4.47k stars 215 forks source link

[Bug]: Interconnected Filters Not Refreshing Properly #2828

Open chapeaupaul opened 1 day ago

chapeaupaul commented 1 day ago

Describe the bug

In a dashboard with multiple interconnected filters, selecting or updating a value in one filter does not trigger the other filters to refresh their values as expected when filters are initially set to display all values by default.

For instance, when a filter is configured to update its values dynamically based on the selection in another filter, the expected cascading behavior does not occur.

Slack thread

Steps to Reproduce

Create two filters with multi-select enabled and "Select All" set as the default option. Configure the filters to cascade, so that the values in one filter dynamically adjust based on the selection made in the other.

two filters

sql query one:
```sql  query_one
select
value_one
from table

sql query two:

select 
value_two
from table
where value_one in ${inputs.filter_one.value}

<Dropdown name=filter_one data={query_one} value=value_one selectAllByDefault=true multiple=true />

<Dropdown name=filter data={query_two} value=value_two selectAllByDefault=true multiple=true />


### Logs

```Shell

System Info

Severity

serious, but I can work around it

Additional Information, or Workarounds

No response