Skip to content

fix(sqllab): filter results table when typing in the search box#41625

Merged
msyavuz merged 1 commit into
apache:masterfrom
msyavuz:msyavuz/fix/sqllab-results-search-bar
Jul 2, 2026
Merged

fix(sqllab): filter results table when typing in the search box#41625
msyavuz merged 1 commit into
apache:masterfrom
msyavuz:msyavuz/fix/sqllab-results-search-bar

Conversation

@msyavuz

@msyavuz msyavuz commented Jul 1, 2026

Copy link
Copy Markdown
Member

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 empty useCallback deps reading filterText 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.

Fix: depend on filterText directly 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

  1. SQL Lab → run any query with multiple rows.
  2. Type into the Filter results box above the results table.
  3. The table filters live to rows matching the text (case-insensitive).

ADDITIONAL INFORMATION

  • Has associated issue:
  • Required feature flags: None
  • Changes UI — SQL Lab results table filtering
  • Includes DB Migration: No
  • Introduces new feature or API: No
  • Removes existing feature or API: No

@dosubot dosubot Bot added change:frontend Requires changing the frontend sqllab Namespace | Anything related to the SQL Lab labels Jul 1, 2026
@bito-code-review

bito-code-review Bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Code Review Agent Run #3877a8

Actionable Suggestions - 0
Review Details
  • Files reviewed - 2 · Commit Range: 9ac02f1..9ac02f1
    • superset-frontend/src/SqlLab/components/ResultSet/ResultSet.test.tsx
    • superset-frontend/src/components/FilterableTable/index.tsx
  • Files skipped - 0
  • Tools
    • Whispers (Secret Scanner) - ✔︎ Successful
    • Detect-secrets (Secret Scanner) - ✔︎ Successful

Bito Usage Guide

Commands

Type the following command in the pull request comment and save the comment.

  • /review - Manually triggers a full AI review.

  • /pause - Pauses automatic reviews on this pull request.

  • /resume - Resumes automatic reviews.

  • /resolve - Marks all Bito-posted review comments as resolved.

  • /abort - Cancels all in-progress reviews.

Refer to the documentation for additional commands.

Configuration

This repository uses Superset You can customize the agent settings here or contact your Bito workspace admin at evan@preset.io.

Documentation & Help

AI Code Review powered by Bito Logo

@codecov

codecov Bot commented Jul 1, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 64.60%. Comparing base (246bbeb) to head (707a526).

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              
Flag Coverage Δ
javascript 69.35% <100.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@bito-code-review

bito-code-review Bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Code Review Agent Run #c4b5c0

Actionable Suggestions - 0
Review Details
  • Files reviewed - 2 · Commit Range: c7510f0..c7510f0
    • superset-frontend/src/SqlLab/components/ResultSet/ResultSet.test.tsx
    • superset-frontend/src/components/FilterableTable/index.tsx
  • Files skipped - 0
  • Tools
    • Whispers (Secret Scanner) - ✔︎ Successful
    • Detect-secrets (Secret Scanner) - ✔︎ Successful

Bito Usage Guide

Commands

Type the following command in the pull request comment and save the comment.

  • /review - Manually triggers a full AI review.

  • /pause - Pauses automatic reviews on this pull request.

  • /resume - Resumes automatic reviews.

  • /resolve - Marks all Bito-posted review comments as resolved.

  • /abort - Cancels all in-progress reviews.

Refer to the documentation for additional commands.

Configuration

This repository uses Superset You can customize the agent settings here or contact your Bito workspace admin at evan@preset.io.

Documentation & Help

AI Code Review powered by Bito Logo

@EnxDev EnxDev left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

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.
@msyavuz
msyavuz force-pushed the msyavuz/fix/sqllab-results-search-bar branch from c7510f0 to 707a526 Compare July 2, 2026 08:38
@msyavuz
msyavuz merged commit a919dda into apache:master Jul 2, 2026
66 checks passed
@bito-code-review

Copy link
Copy Markdown
Contributor

Bito Automatic Review Skipped – PR Already Merged

Bito scheduled an automatic review for this pull request, but the review was skipped because this PR was merged before the review could be run.
No action is needed if you didn't intend to review it. To get a review, you can type /review in a comment and save it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

change:frontend Requires changing the frontend size/M sqllab Namespace | Anything related to the SQL Lab

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants