fix(sqllab): filter results table when typing in the search box#41625
Conversation
Code Review Agent Run #3877a8Actionable Suggestions - 0Review Details
Bito Usage GuideCommands Type the following command in the pull request comment and save the comment.
Refer to the documentation for additional commands. Configuration This repository uses Documentation & Help |
9ac02f1 to
c7510f0
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #41625 +/- ##
==========================================
- Coverage 64.60% 64.60% -0.01%
==========================================
Files 2684 2684
Lines 148192 148191 -1
Branches 34138 34138
==========================================
- Hits 95738 95737 -1
Misses 50711 50711
Partials 1743 1743
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Code Review Agent Run #c4b5c0Actionable Suggestions - 0Review Details
Bito Usage GuideCommands Type the following command in the pull request comment and save the comment.
Refer to the documentation for additional commands. Configuration This repository uses Documentation & Help |
The "Filter results" search box in the SQL Lab results panel stopped filtering the table. FilterableTable built its ag-Grid external-filter callback with empty useCallback deps reading from a ref, so the callback reference never changed as the user typed; GridTable derives isExternalFilterPresent from that reference, so ag-Grid never re-applied the filter. Depend on filterText directly so a new value produces a new callback reference and ag-Grid re-runs the (case-insensitive substring) filter. This restores the fix from apache#38813 that the React 18 upgrade reverted.
c7510f0 to
707a526
Compare
|
Bito Automatic Review Skipped – PR Already Merged |
SUMMARY
The Filter results search box in the SQL Lab results panel stopped filtering the table — typing did nothing.
Root cause is in
FilterableTable: it built the ag-Grid external-filter callback with emptyuseCallbackdeps readingfilterTextfrom a ref, so the callback reference never changed as the user typed.GridTablederivesisExternalFilterPresentfrom that reference, so ag-Grid never re-applied the filter.Fix: depend on
filterTextdirectly so a new value yields a new callback reference and ag-Grid re-runs the (case-insensitive substring) filter. This restores the fix from #38813 that the React 18 upgrade (#38563) reverted.BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
To add. Before: typing in "Filter results" leaves all rows shown. After: rows filter live to the typed text.
TESTING INSTRUCTIONS
ADDITIONAL INFORMATION