Skip to content

Commit 22335a2

Browse files
committed
Make 'Next' button on Dropdown step enabled if navigated back after license attributes have been selected
>> Fixes: When attribution is selected, CC BY is set as the selected license in the state. When Going back to step one, then selecting that you already know which license you need, CC BY is automatically set as the selected license in the dropdown. This creates some weird behavior where there is a selected license in the dropdown, but the "Next Question" button is not enabled. Signed-off-by: Olga Bulat <obulat@gmail.com>
1 parent 6dda97a commit 22335a2

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/components/Stepper.vue

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,11 @@ export default {
158158
*/
159159
if (this.isLicenseAttribute(stepName)) {
160160
this.$store.commit('setSelected', { stepName, isSelected })
161+
// When the user first selects a license attribute, the dropdown step's Next button should be enabled
162+
// as the dropdown will be populated with the selected license from the state
163+
if (this.steps[5].selected === undefined && stepName === 'BY') {
164+
this.steps[5].selected = true
165+
}
161166
}
162167
this.$set(this.steps, stepId, { ...this.steps[stepId], selected: isSelected })
163168
this.updateDisabledAndVisibleSteps(stepName, isSelected)

0 commit comments

Comments
 (0)