Skip to content

fix: show reset button for uncontrolled searchbox#1360

Merged
Ninfa-Jeon merged 1 commit intocanonical:mainfrom
Ninfa-Jeon:search-box-reset
Apr 28, 2026
Merged

fix: show reset button for uncontrolled searchbox#1360
Ninfa-Jeon merged 1 commit intocanonical:mainfrom
Ninfa-Jeon:search-box-reset

Conversation

@Ninfa-Jeon
Copy link
Copy Markdown
Contributor

Done

  • I have added a local state to the SearchBox component to track input for internally-controlled cases
  • This allows the "reset"/"close" button to be rendered for this case as well

QA

Pinging @canonical/react-library-maintainers for a review.

Storybook

To see rendered examples of all react-components, run:

yarn start

QA in your project

from react-components run:

yarn build
npm pack

Install the resulting tarball in your project with:

yarn add <path-to-tarball>

QA steps

  • Open the storybook and see that the close button is appearing for internally-controlled cases as well

Percy steps

  • No visual changes expected

Copy link
Copy Markdown
Contributor

@huwshimi huwshimi left a comment

Choose a reason for hiding this comment

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

Thanks!

@Ninfa-Jeon Ninfa-Jeon merged commit a2ce1bc into canonical:main Apr 28, 2026
10 of 11 checks passed
@Ninfa-Jeon Ninfa-Jeon deleted the search-box-reset branch April 28, 2026 06:10
@github-actions
Copy link
Copy Markdown

🎉 This PR is included in version 4.4.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants