-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Description
There are issues with field "name" type, I mean the type calculated with the ExtractKeysOfValueType utility.
Especially with a nested object form value type, so if the name is like mapStore.className the utility can't determine the type falling back to never...
I see two options:
Formikis using a simple string type for all names, we could do the same. But it would be a degradation, sinceExtractKeysOfValueTypeworks nice in 90% of cases.- Add a possibility to turn strict type of bypassing a ready type value, e.g. in the exanple if passing the second generic argument (string) it won't check with
ExtractKeysOfValueType
<SelectFieldFormik<MapConfigurationFormValues, string>
options={customClassesOptions}
label="Class Name"
name="mapStore.className"
disabled={Boolean(errorMessage)}
/>
Comment from @allfayn
We can take one of these strategies:
- try use default string type as a prop, then not have FormValues
- use the second parameter as above
- use recursive type for this complex form values
Metadata
Metadata
Assignees
Labels
No labels