You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I got a solution on how to add the clear feature by adding a button and its event handler:
let x = document.querySelector("input.react-search-field-input");
x.value='';
@chenhualihx
I believe the ideal approach should be handling the clear option using props without any breaking changes.
Your approach would be an option but the side effect is it would mutate the component.
The proposed solution would be
Add a new prop (clearOption) and mark it false by default.
if the prop is true, introduce a close button, (Though I am still thinking what should be the right place to display this button).
Search field is working fine but I want to clear Search Field on Button Click.
One more Question How can I change for color
The text was updated successfully, but these errors were encountered: