fix: conditions on conditionals
This commit is contained in:
@@ -88,7 +88,7 @@ const RenderFields: React.FC<Props> = (props) => {
|
||||
DefaultComponent={FieldComponent}
|
||||
componentProps={{
|
||||
...field,
|
||||
path: field.path || (isFieldAffectingData ? field.name : undefined),
|
||||
path: field.path || (isFieldAffectingData ? field.name : ''),
|
||||
fieldTypes,
|
||||
admin: {
|
||||
...(field.admin || {}),
|
||||
|
||||
@@ -28,7 +28,7 @@ const withCondition = <P extends Record<string, unknown>>(Field: React.Component
|
||||
path?: string
|
||||
};
|
||||
|
||||
const path = pathFromProps || name;
|
||||
const path = typeof pathFromProps === 'string' ? pathFromProps : name;
|
||||
|
||||
const { getData, getSiblingData, getField, dispatchFields } = useWatchForm();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user