Simple clear contents icon at the end of a text field
I would like to see a small x clear button on the right of a BitTextField that would allow the value to be reset to empty.
Here's a sample from another package:
Possible feature set:
- Parameter to switch on this behavior is
Clearor something like that. - Only show the clear icon when the field has a value in it.
- Optional
ClearIonNameparameter to replace thexif passed. - Optional
OnClearparameter allowing a function to be passed in and executed before the value is cleared (allowing a capture of the current value before clearing it with a bool return so the clear can be blocked. - Retain
SuffixTemplate,Suffixparameters and have them behave as they do now.
When I tried to use the ChromeClose icon, I noticed that I couldn't make it as small as I wanted, but I haven't considered mobile size implications and you guys probably have. I think it's the correct size for modals and such, but it seems a little big for a text field.
The sample above demonstrates the look. If you visit the MudBlazor site, you can see this field type in action.
If this list is too long, just features 1 and 2 would be fabulous.
Thank you for considering.
Originally posted by @nhwilly in https://github.com/bitfoundation/bitplatform/discussions/11840
Hello there! I'm a wiki 🤖.
Based on the content of this thread, I've found a potentially relevant wiki page for you!
I hope this helps!
Thanks for contacting us. We're investigating this issue. We'll let you know if it's possible to work on this issue.