-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Closed
Labels
[Package] Components/packages/components/packages/components[Status] In ProgressTracking issues with work in progressTracking issues with work in progress[Type] BugAn existing feature does not function as intendedAn existing feature does not function as intended
Description
Description
The SearchControl component has an icon suffix to show a magnifying lens or the close icon conditionally.
But when the onClose prop is set, the lens icon is never shown, and the close icon is always shown.
Step-by-step reproduction instructions
<SearchControl
value={ text }
onChange={ setText }
onClose={ () => {} } // comment and uncomment this line to observe the bug.
/>Expected behavior
- When
onCloseis not set, the search icon should be always shown (for empty and non-empty field) - When
onCloseis set, then the close icon should be shown when the field is not empty, and search icon should be shown when the field is empty.
Screenshots, screen recording, code snippet
No response
Environment info
No response
Please confirm that you have searched existing issues in the repo.
- Yes
Please confirm that you have tested with all plugins deactivated except Gutenberg.
- Yes
Metadata
Metadata
Assignees
Labels
[Package] Components/packages/components/packages/components[Status] In ProgressTracking issues with work in progressTracking issues with work in progress[Type] BugAn existing feature does not function as intendedAn existing feature does not function as intended