Skip to content

Commit aa90df6

Browse files
committed
Pick value for useField config to keep compatibility
1 parent 07634d4 commit aa90df6

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

packages/react-form-renderer/src/use-field-api/use-field-api.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,11 @@ const useFieldApi = ({
121121
dataType,
122122
type: combinedProps.type,
123123
...(Object.prototype.hasOwnProperty.call(combinedProps, 'initialValue')
124-
? {initialValue: combinedProps.initialValue}
124+
? { initialValue: combinedProps.initialValue }
125+
: {}
126+
),
127+
...(Object.prototype.hasOwnProperty.call(combinedProps, 'value')
128+
? { value: combinedProps.value }
125129
: {}
126130
),
127131
...FieldProps,

0 commit comments

Comments
 (0)