-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SearchControl: Deprecate onClose
prop
#65334
Labels
[Package] Components
/packages/components
[Type] Code Quality
Issues or PRs that relate to code quality
Comments
mirka
added
[Type] Code Quality
Issues or PRs that relate to code quality
[Package] Components
/packages/components
labels
Sep 13, 2024
2 tasks
Agreed. We could add a dedicated Storybook example too |
Hi @mirka 👋
|
Yes, I don't think we need to document it officially. At most, I'll maybe add it to a Dev Note. |
Sounds good. I have addressed the feedback in my latest commit : |
Closed by #65988 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
[Package] Components
/packages/components
[Type] Code Quality
Issues or PRs that relate to code quality
What problem does this address?
The
onClose
prop is not used anymore in the Gutenberg app. It was originally intended to render a close button to "trigger your own logic to close the search field entirely, rather than just clearing the input value."The prop itself is causing confusion to consumers (#64921), and I think the UI pattern of a single button that doubles as a reset and a close is questionable from a UX standpoint.
What is your proposed solution?
I think we can soft deprecate the feature. For consumers that really want to maintain the original behavior, however unrecommended, we can issue guidance to use the
suffix
prop.The text was updated successfully, but these errors were encountered: