switches don't work in a FormAccess form

not all of their props where copied
This commit is contained in:
Erik Jan de Wit 2020-12-17 16:05:44 +01:00
parent 7c3a5739eb
commit bb51903ce8

View file

@ -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,
});
},