lyndagolomb opened a new issue, #45050:
URL: https://github.com/apache/superset/issues/45050

   ### Bug description
   
   In the **horizontal** filter bar, after a table chart emits a cross-filter, 
all the dashboard's native filters (Account, Date range, Flow) disappear from 
the bar. There is no "More filters" button either; only the cross-filter chip 
is left. A full browser refresh brings the native filters back while the 
cross-filter is still applied. The vertical filter bar does not show the 
problem (checked on our full dashboard).
   
   **Setup (minimal dashboard, no tabs, no custom CSS)**
   - Dashboard `filter_bar_orientation: HORIZONTAL`.
   - Two charts on the same dataset: a Table chart (aggregate, grouped by one 
dimension) with cross-filtering enabled (`table_filter: true`), and a Big 
Number that receives the cross-filter.
   - Three native filters:
     1. **Account**: Value filter, single select, with `requiredFirst: true` 
and `controlValues.defaultToFirstItem: true` (the "Filter value is required" 
and "first value by default" behaviour).
     2. **Date range**: Time range filter with a non-empty default, e.g. 
`DATETRUNC(DATEADD(DATETIME('today'), -1, MONTH), MONTH) : DATETIME('today')`.
     3. **Flow**: plain Value filter.
   
   **Steps**
   1. Open the dashboard. The three native filters are shown in the horizontal 
bar and Account is applied automatically.
   2. Click a row in the Table chart (cross-filter).
   3. The cross-filter chip appears, but Account / Date range / Flow vanish 
from the bar, with no overflow ("More filters") control.
   4. Refresh the browser: the native filters reappear and the cross-filter is 
still applied.
   
   **Expected:** the native filters stay visible (or move into "More filters" 
if space is tight).
   
   **What we found by bisecting (all with the same cross-filtering table):**
   - Does NOT happen when the Account filter has a required-first setting but 
the Date range has no default ("No filter").
   - Does NOT happen when the Date range has a default but the Account filter 
is not `requiredFirst` (default value shown but not auto-applied).
   - DOES happen with `requiredFirst: true` + a default Date range, with or 
without `enableEmptyFilter`.
   - Tabs, dependent (cascading) filters, a custom cross-filter scope and 
custom CSS were not needed to reproduce it (we tested minimal dashboards 
without them).
   - Vertical filter bar: not reproduced on our full dashboard (not re-tested 
on the minimal one).
   
   ### Screenshots/recordings
   
   Not attached. I can add a screenshot / recording of before and after the 
click if useful.
   
   ### Superset version
   
   6.1.0 (docker image `apache/superset:6.1.0`)
   
   ### Python version / Node version
   
   Not applicable: this is a frontend (filter bar) problem.
   
   ### Browser
   
   Desktop browser (not tested across browsers).
   
   ### Additional context
   
   - Feature flag: `DASHBOARD_CROSS_FILTERS: True`. Data source: PostgreSQL. No 
other customizations on the minimal dashboard.
   - Reading the frontend code, `FilterBar/index.tsx` force-applies a filter's 
default at initialisation only for `requiredFirst` filters, which may be 
related, since `requiredFirst` is what triggers the problem together with a 
default Date range.
   - Possibly related: #40721 (cross-filter chips crowding the horizontal bar 
and pushing filters into overflow) and #33054 (overflow recalculation when 
filter widths change). I did not find an existing issue for this exact 
behaviour.
   
   ### Checklist
   
   - [ ] I have searched Superset docs and Slack and didn't find a solution to 
my problem. (not done)
   - [x] I have searched the GitHub issue tracker and didn't find a similar bug 
report.
   - [ ] I have checked Superset's logs for errors and if I found a relevant 
Python stacktrace, I included it here as text in the "additional context" 
section. (not checked; frontend-only behaviour, no server error expected)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to