From 2512256ac330271213783d4e937ff11dc4b01bfc Mon Sep 17 00:00:00 2001 From: fzaninotto Date: Sun, 3 Jan 2021 16:26:11 +0100 Subject: [PATCH] Fix findDOMNode warning in StrictMode when using SimpleformIterator Closes #5693 --- packages/ra-ui-materialui/src/form/SimpleFormIterator.tsx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/ra-ui-materialui/src/form/SimpleFormIterator.tsx b/packages/ra-ui-materialui/src/form/SimpleFormIterator.tsx index ce6991e27e2..0fb1f314a81 100644 --- a/packages/ra-ui-materialui/src/form/SimpleFormIterator.tsx +++ b/packages/ra-ui-materialui/src/form/SimpleFormIterator.tsx @@ -114,6 +114,7 @@ const SimpleFormIterator: FC = props => { defaultValue, } = props; const classes = useStyles(props); + const nodeRef = useRef(null); // We need a unique id for each field for a proper enter/exit animation // so we keep an internal map between the field position and an auto-increment id @@ -184,6 +185,7 @@ const SimpleFormIterator: FC = props => { {fields.map((member, index) => (