Skip to content

Set a field's value to undefined #300

Description

@LouisLuBrain

Is your feature request related to a problem? Please describe.

I have a feature during my work: set a field's value to undefined
like a custom data picker, users can click the X button to clear the value so I need to set the data to undefined and show the error message. I know we can reset the field, but what if it has an initial value?

Describe the solution you'd like
Maybe add a parameter in the function resetField to let me set the reset value.

Describe alternatives you've considered

Additional context
BTW this works, but our team doesn't want to use type cast:
setData("dob", e!);

This a screenshot for this
Screen Shot 2024-08-05 at 12 39 29 AM

Great thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions