From bb51903ce80b5a9562cc34e8171401d370d7dd4b Mon Sep 17 00:00:00 2001 From: Erik Jan de Wit Date: Thu, 17 Dec 2020 16:05:44 +0100 Subject: [PATCH] switches don't work in a `FormAccess` form not all of their props where copied --- src/components/form-access/FormAccess.tsx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/components/form-access/FormAccess.tsx b/src/components/form-access/FormAccess.tsx index 98fedafd3b..3d8eaf453f 100644 --- a/src/components/form-access/FormAccess.tsx +++ b/src/components/form-access/FormAccess.tsx @@ -69,8 +69,7 @@ export const FormAccess = ({ render: (props: any) => { const renderElement = element.props.render(props); return cloneElement(renderElement, { - value: props.value, - onChange: props.onChange, + ...renderElement.props, ...newProps, }); },