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've hit a situation where I define the values in the schema, which is stored in a static file, but I want to override the default values via fieldConfig.inputProps which I feel should get priority
if (
(defaultValue === null || defaultValue === "") &&
fieldConfig?.[key]?.inputProps
) {
defaultValue = (fieldConfig?.[key]?.inputProps as unknown as any)
.defaultValue;
}
I would change this to:
if ((fieldConfig?.[key]?.inputProps as unknown as any)?.defaultValue) {
defaultValue = (fieldConfig?.[key]?.inputProps as unknown as any)
.defaultValue
}
This way the inputProps will get the highest prio and override the schema default value. What do you think @vantezzen ?
The text was updated successfully, but these errors were encountered:
I've hit a situation where I define the values in the schema, which is stored in a static file, but I want to override the default values via fieldConfig.inputProps which I feel should get priority
I would suggest the following change here:
auto-form/src/components/ui/auto-form/utils.ts
Line 105 in 0143f43
Instead of
I would change this to:
This way the inputProps will get the highest prio and override the schema default value. What do you think @vantezzen ?
The text was updated successfully, but these errors were encountered: