Skip to content

fix(ui): cancel debounce on clear to prevent stale search value#64893

Merged
bbovenzi merged 1 commit into
apache:mainfrom
Mayankaggarwal8055:fix-searchbar-debounce-bug
Apr 8, 2026
Merged

fix(ui): cancel debounce on clear to prevent stale search value#64893
bbovenzi merged 1 commit into
apache:mainfrom
Mayankaggarwal8055:fix-searchbar-debounce-bug

Conversation

@Mayankaggarwal8055

Copy link
Copy Markdown
Contributor

Fixes #64892

Problem

The SearchBar uses a debounced onChange handler. If a user types a query and immediately clears the input, the pending debounce callback is not cancelled.

As a result, the old query value is applied again after the debounce delay, causing the cleared input to revert to the previous value.

Solution

Cancel the pending debounce when clearing the input before calling onChange("").

Tests

  • Added regression test to ensure stale values are not applied after clearing
  • Verified clearing emits empty value immediately

@bbovenzi bbovenzi added this to the Airflow 3.2.1 milestone Apr 8, 2026
@bbovenzi bbovenzi merged commit 4d75f0a into apache:main Apr 8, 2026
84 checks passed
github-actions Bot pushed a commit that referenced this pull request Apr 8, 2026
… value (#64893)

(cherry picked from commit 4d75f0a)

Co-authored-by: Mayank Aggarwal <[email protected]>
@github-actions

github-actions Bot commented Apr 8, 2026

Copy link
Copy Markdown
Contributor

Backport successfully created: v3-2-test

Note: As of Merging PRs targeted for Airflow 3.X
the committer who merges the PR is responsible for backporting the PRs that are bug fixes (generally speaking) to the maintenance branches.

In matter of doubt please ask in #release-management Slack channel.

Status Branch Result
v3-2-test PR Link

github-actions Bot pushed a commit to aws-mwaa/upstream-to-airflow that referenced this pull request Apr 8, 2026
… value (apache#64893)

(cherry picked from commit 4d75f0a)

Co-authored-by: Mayank Aggarwal <[email protected]>
pierrejeambrun pushed a commit that referenced this pull request Apr 10, 2026
… value (#64893) (#64907)

(cherry picked from commit 4d75f0a)

Co-authored-by: Mayank Aggarwal <[email protected]>
vatsrahul1001 pushed a commit that referenced this pull request Apr 15, 2026
… value (#64893) (#64907)

(cherry picked from commit 4d75f0a)

Co-authored-by: Mayank Aggarwal <[email protected]>
vatsrahul1001 pushed a commit that referenced this pull request Apr 15, 2026
… value (#64893) (#64907)

(cherry picked from commit 4d75f0a)

Co-authored-by: Mayank Aggarwal <[email protected]>
vatsrahul1001 pushed a commit that referenced this pull request Apr 15, 2026
… value (#64893) (#64907)

(cherry picked from commit 4d75f0a)

Co-authored-by: Mayank Aggarwal <[email protected]>
vatsrahul1001 pushed a commit that referenced this pull request Apr 15, 2026
… value (#64893) (#64907)

(cherry picked from commit 4d75f0a)

Co-authored-by: Mayank Aggarwal <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:UI Related to UI/UX. For Frontend Developers.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

SearchBar: debounced query reapplied after clearing input

2 participants