Closed NicholasMata closed 1 week ago
@NicholasMata, you can create a wrapper component to achieve the behavior of displaying a skeleton when formState.isLoading is true.
Including a skeleton or loader for components like TextField, Radio, etc., would introduce unnecessary overhead to the library. This is something that I believe should be handled by the developer on their own.
Duplicates
Latest version
Summary 💡
The following is a proposal to add support for
isLoading
property on FormState.isLoading
is used to track the loading ofdefaultValues
when it is an asynchronous function.I would like to propose adding custom skeletons for all the components this library provides. Which will appear when
isLoading
is true onFormState
.NOTE: I am willing to take on the work, if you are open to the proposal.
Examples 🌈
Current Behavior: When an asynchronous
defaultValues
is provided the fields remain empty/blank but still allow for user interaction. Then oncedefaultValues
completes all fields get set.Expected Behavior: When an asynchronous
defaultValues
is provided the fields will display a skeleton based on the component which will not allow for user interactions. Then oncedefaultValues
completes all fields get set.