SearchControl: Deprecate onClose
prop
#65334
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: