Skip to content

Commit 5e41480

Browse files
abelsiqueirac-martinez
authored andcommitted
Change visual feedback on stepper to only show errors from previous steps
1 parent 7d86c70 commit 5e41480

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/components/Stepper.vue

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
<q-stepper
44
animated
55
class="transparent"
6+
active-color="dark"
67
done-color="primary"
78
error-color="negative"
89
inactive-color="grey-7"
@@ -13,12 +14,12 @@
1314
>
1415
<q-step
1516
v-for="(step, stepIndex) in stepNames"
16-
v-bind:active-icon="activeIcon(errorPerStep[step].value, step)"
17+
v-bind:active-icon="activeIcon(currentStepIndex > stepIndex && errorPerStep[step].value, step)"
1718
v-bind:aria-label="toLabel(step)"
18-
v-bind:caption="stepIndex < 2 ? 'required' : ''"
19+
v-bind:caption="stepIndex < 2 ? 'required' : 'optional'"
1920
v-bind:data-cy="`step-${step}`"
2021
v-bind:done="currentStepIndex > stepIndex"
21-
v-bind:error="errorPerStep[step].value"
22+
v-bind:error="currentStepIndex > stepIndex && errorPerStep[step].value"
2223
v-bind:key="step"
2324
v-bind:name="step"
2425
v-bind:order="stepIndex"

0 commit comments

Comments
 (0)