From cd708fa294afc698a1ac9ff615e63c173853183d Mon Sep 17 00:00:00 2001 From: Bogdan Bodnar Date: Wed, 6 May 2020 19:28:46 +0200 Subject: [PATCH] Add initial form data to children of the ForisForm. --- src/common/WiFiSettings/WiFiForm.js | 5 ++--- src/form/components/ForisForm.js | 1 + 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/common/WiFiSettings/WiFiForm.js b/src/common/WiFiSettings/WiFiForm.js index a779f77..34aa2f7 100644 --- a/src/common/WiFiSettings/WiFiForm.js +++ b/src/common/WiFiSettings/WiFiForm.js @@ -36,7 +36,7 @@ WiFiForm.defaultProps = { }; export default function WiFiForm({ - formData, formErrors, setFormValue, hasGuestNetwork, ...props + formData, formErrors, setFormValue, hasGuestNetwork, disabled, }) { return formData.devices.map((device) => ( )); } diff --git a/src/form/components/ForisForm.js b/src/form/components/ForisForm.js index fd66abf..e2cf06e 100644 --- a/src/form/components/ForisForm.js +++ b/src/form/components/ForisForm.js @@ -149,6 +149,7 @@ export function ForisForm({ const childrenWithFormProps = React.Children.map( children, (child) => React.cloneElement(child, { + initialData: formState.initialData, formData: formState.data, formErrors: formState.errors, setFormValue: onFormChangeHandler,