merge formData with current in Stepper onChange
Signed-off-by: Paul Cowan <paul.cowan@cutting.scot>
This commit is contained in:
@@ -102,7 +102,8 @@ export const Stepper = (props: StepperProps) => {
|
||||
};
|
||||
|
||||
const handleChange = useCallback(
|
||||
(e: IChangeEvent) => setFormState(e.formData),
|
||||
(e: IChangeEvent) =>
|
||||
setFormState(current => ({ ...current, ...e.formData })),
|
||||
[setFormState],
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user