diff --git a/src/Field.tsx b/src/Field.tsx index 7a5eb868..928767ae 100644 --- a/src/Field.tsx +++ b/src/Field.tsx @@ -627,7 +627,6 @@ class Field extends React.Component implements F function WrapperField({ name, ...restProps }: FieldProps) { const fieldContext = React.useContext(FieldContext); const listContext = React.useContext(ListContext); - const mergedIsListField = restProps.isListField || (!restProps.isList && !!listContext); const namePath = name !== undefined ? getNamePath(name) : undefined; let key: string = 'keep'; @@ -650,7 +649,7 @@ function WrapperField({ name, ...restProps }: FieldProps) diff --git a/src/List.tsx b/src/List.tsx index 64db2e20..839e8908 100644 --- a/src/List.tsx +++ b/src/List.tsx @@ -43,6 +43,7 @@ const List: React.FunctionComponent = ({ isListField, }) => { const context = React.useContext(FieldContext); + const wrapperListContext = React.useContext(ListContext); const keyRef = React.useRef({ keys: [], id: 0, @@ -91,7 +92,7 @@ const List: React.FunctionComponent = ({ validateTrigger={validateTrigger} initialValue={initialValue} isList - isListField={isListField} + isListField={isListField ?? !!wrapperListContext} > {({ value = [], onChange }, meta) => { const { getFieldValue } = context;