sadpandajoe opened a new pull request, #36686:
URL: https://github.com/apache/superset/pull/36686
### SUMMARY
Fixes an infinite reload loop in Dashboard context where table charts would
continuously re-query, causing hundreds/thousands of API calls per user.
**Root Cause:** The recent "Export table data with Search box" feature (PR
#36281) added clientView to ownState on every filtered-row change. In Dashboard
context, getRelevantDataMask passed this through unchanged, causing
Dashboard.jsx to see continuous state changes and trigger re-queries in an
infinite loop.
**Fix:** Strip clientView from ownState in getRelevantDataMask (the selector
that extracts chart state for Dashboard). This matches the existing pattern in
ExploreViewContainer which already strips clientView before comparing state
changes.
```
// Before: passed ownState through unchanged
.map(item => [item.id, item[prop]])
// After: strips clientView when prop is 'ownState'
.map(item => [
item.id,
prop === 'ownState' ? omit(item[prop], ['clientView']) : item[prop],
])
```
**Why this location:** clientView is explicitly for export functionality,
not for triggering re-queries. Stripping at the selector level ensures
Dashboard never sees these changes as state updates.
### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
<!--- Skip this if not applicable -->
### TESTING INSTRUCTIONS
<!--- Required! What steps can be taken to manually verify the changes? -->
1. Open a dashboard containing a table chart with server-side pagination
disabled
2. Apply a filter or interact with the table search box
3. Open browser DevTools → Network tab
4. Verify there are NO repeated /api/v1/chart/data calls
5. Verify the "Export" functionality still works correctly (exports filtered
data)
### ADDITIONAL INFORMATION
<!--- Check any relevant boxes with "x" -->
<!--- HINT: Include "Fixes #nnn" if you are fixing an existing issue -->
- [ ] Has associated issue: Fixes #36595
- [ ] Required feature flags:
- [ ] Changes UI
- [ ] Includes DB Migration (follow approval process in
[SIP-59](https://github.com/apache/superset/issues/13351))
- [ ] Migration is atomic, supports rollback & is backwards-compatible
- [ ] Confirm DB migration upgrade and downgrade tested
- [ ] Runtime estimates and downtime expectations provided
- [ ] Introduces new feature or API
- [ ] Removes existing feature or API
--
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]