FunctionuseFormSubmissionState
- useFormSubmissionState(form, initialSubmission?, lastElementUpdated?, sectionState?): [{
definition: Form;
executedLookups: ExecutedLookups;
lastElementUpdated: undefined | FormElement;
sectionState: undefined | {
id: string;
state: "COLLAPSED" | "EXPANDED";
}[];
submission: {
[name: string]: unknown;
};
}, Dispatch<SetStateAction<{
definition: Form;
executedLookups: ExecutedLookups;
lastElementUpdated: undefined | FormElement;
sectionState: undefined | {
id: string;
state: "COLLAPSED" | "EXPANDED";
}[];
submission: {
[name: string]: unknown;
};
}>>] Parameters
- form: Form
Optional
initialSubmission: {
[name: string]: unknown;
}Optional
lastElementUpdated: FormElementOptional
sectionState: {
id: string;
state: "COLLAPSED" | "EXPANDED";
}[]
Returns [{
definition: Form;
executedLookups: ExecutedLookups;
lastElementUpdated: undefined | FormElement;
sectionState: undefined | {
id: string;
state: "COLLAPSED" | "EXPANDED";
}[];
submission: {
[name: string]: unknown;
};
}, Dispatch<SetStateAction<{
definition: Form;
executedLookups: ExecutedLookups;
lastElementUpdated: undefined | FormElement;
sectionState: undefined | {
id: string;
state: "COLLAPSED" | "EXPANDED";
}[];
submission: {
[name: string]: unknown;
};
}>>]
This function is a simple wrapper around the react hook
useState()
. The results can be passed to the<OneBlinkForm />
//TODO: Fix link component.Example