Skip to content

SearchBar does not sync with updated defaultValue (URL-driven filters) #65053

@Mayankaggarwal8055

Description

@Mayankaggarwal8055

Under which category would you file this issue?

Providers

Apache Airflow version

latest

What happened and how to reproduce it?

Description

The SearchBar component initializes its internal state using the defaultValue prop, but does not properly stay in sync when defaultValue changes after the initial render.

This commonly happens when the search value is controlled via URL query parameters (e.g., in pages like DagsList, Connections, AssetsList). When navigation actions (such as back/forward) update the query params, the defaultValue prop changes, but the input field does not reflect the updated value.


Steps to reproduce

  1. Open a page using SearchBar (e.g., Dags list)
  2. Type a search query (e.g., "air")
  3. Change the URL query parameter (or use browser back/forward navigation)
  4. Observe the search input

Current behavior

  • The actual filter (URL/query param) updates
  • The SearchBar input does NOT update
  • UI and filter state become inconsistent

What you think should happen instead?

Expected behavior

  • SearchBar input should update whenever defaultValue changes
  • UI should always reflect the current filter state
  • No mismatch between visible input and actual filter

Operating System

window 11

Deployment

None

Apache Airflow Provider(s)

No response

Versions of Apache Airflow Providers

No response

Official Helm Chart version

Not Applicable

Kubernetes Version

No response

Helm Chart configuration

No response

Docker Image customizations

No response

Anything else?

This issue occurs consistently when navigating or updating query parameters externally.

It impacts user experience by causing the search input to display outdated values while the actual filtering logic uses the updated value.

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:UIRelated to UI/UX. For Frontend Developers.kind:bugThis is a clearly a bugneeds-triagelabel for new issues that we didn't triage yet

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions