From a4cab5b9144e3025f7d6aafab337359e861a03b6 Mon Sep 17 00:00:00 2001 From: blam Date: Tue, 11 Apr 2023 16:27:32 +0200 Subject: [PATCH] chore: some feedback Signed-off-by: blam --- .changeset/poor-horses-approve.md | 2 +- .../scaffolder-react/src/next/components/Stepper/Stepper.tsx | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.changeset/poor-horses-approve.md b/.changeset/poor-horses-approve.md index 7214b6432a..ecd60e2c6c 100644 --- a/.changeset/poor-horses-approve.md +++ b/.changeset/poor-horses-approve.md @@ -2,4 +2,4 @@ '@backstage/plugin-scaffolder-react': patch --- -Add indication that the validators are running +Add an indication that the validators are running when clicking `next` on each step of the form. diff --git a/plugins/scaffolder-react/src/next/components/Stepper/Stepper.tsx b/plugins/scaffolder-react/src/next/components/Stepper/Stepper.tsx index 37d0b0baef..946cc583a3 100644 --- a/plugins/scaffolder-react/src/next/components/Stepper/Stepper.tsx +++ b/plugins/scaffolder-react/src/next/components/Stepper/Stepper.tsx @@ -135,6 +135,8 @@ export const Stepper = (stepperProps: StepperProps) => { }: { formData?: Record; }) => { + // The validation should never throw, as the validators are wrapped in a try/catch. + // This makes it fine to set and unset state without try/catch. setErrors(undefined); setIsValidating(true);