From 10d47882062b6ca5d9ac8a13dcf11ed4fc2faa40 Mon Sep 17 00:00:00 2001 From: Nick Anisimov Date: Sat, 17 Aug 2024 13:21:48 +0100 Subject: [PATCH 1/2] Fix data-completed `data-completed` should probably depend on the step index, not on its `id` --- packages/react/src/stepper.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/react/src/stepper.tsx b/packages/react/src/stepper.tsx index 3e08afd..9ef4eaf 100644 --- a/packages/react/src/stepper.tsx +++ b/packages/react/src/stepper.tsx @@ -64,7 +64,7 @@ export const Stepper = < "data-step": step.id, "data-optional": step.isOptional ?? false, "data-disabled": step.isDisabled ?? false, - "data-completed": currentStep.id > step.id, + "data-completed": counter > steps.findIndex(s => s.id === id), "data-active": isActive, "data-last": isLastStep, }, From bf9694c150e8877a0245ea58533e9c668ecdb193 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dami=C3=A1n=20Ricobelli?= Date: Mon, 19 Aug 2024 00:09:22 -0300 Subject: [PATCH 2/2] Create late-otters-kick.md --- .changeset/late-otters-kick.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/late-otters-kick.md diff --git a/.changeset/late-otters-kick.md b/.changeset/late-otters-kick.md new file mode 100644 index 0000000..7490e74 --- /dev/null +++ b/.changeset/late-otters-kick.md @@ -0,0 +1,5 @@ +--- +"@stepperize/react": patch +--- + +Fix data-completed