Skip to content

Allow tapping the search icon to trigger onSearch while expanded #24

Description

@cloudigits

Currently, clicking the leading icon while the bar is expanded only replays the bounce animation — onSearch only fires via the IME "search" keyboard action. This matches the documented behavior (onSearch: "Callback triggered when the user presses IME Search"), so it's not a defect, just a possible enhancement.

Many search-bar UIs (e.g. Google's) let the leading icon double as a submit button when text is present, which some consumers may expect. Suggestion: also call onSearch(value) on icon tap when isExpanded && !isLoading (the isLoading guard avoids re-firing while a search is already in flight).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions