carbon
carbon copied to clipboard
Search: clearing a Search component with `searchButton` prop via the text input's clear button should "click" the Search button
Description
If I'm using Search
with searchButton
set, I want to fire another search if a user clicks the clear button in the text input. I want the button so that I don't have to debounce anything, but then it feels like onChange would need several conditions to ignore most activity, and pressing clear and then Search again feels inefficient for what I'm expecting (I've cleared my search condition, so surely that would reset my data?).
Suggested solution
When clear is pressed, also pseudo-click the Search button to "clear the filter" and not just the text input.
Demo URL
https://carbon.sage.com/?path=/docs/search--docs
Alternatives
No response
Additional context
No response
Confidentiality
- [X] I confirm there is no confidential or commercially sensitive information included.