Merge pull request #4486 from aignatov-bio/ai-sci-7285-fix-duplicate-label-in-dropdown-component

Fix duplicate labels in dropdown components [SCI-7285]
This commit is contained in:
aignatov-bio 2022-09-30 19:51:34 +02:00 committed by GitHub
commit aba760f1a4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -11,7 +11,7 @@
<template v-if="groupSelector">
<optgroup v-for="group in this.options" :label="group.label" :key="group.label">
<option v-for="option in group.options"
:key="option.label"
:key="option.value"
:value="option.value"
:selected="option.value == selectedValue || (Array.isArray(selectedValue) && selectedValue.some(e => e == option.value))"
:data-selected="option.value == selectedValue || (Array.isArray(selectedValue) && selectedValue.some(e => e == option.value))"
@ -24,7 +24,7 @@
<template v-else>
<option
v-for="option in this.options"
:key="option.label"
:key="option.value"
:value="option.value"
:selected="option.value == selectedValue || (Array.isArray(selectedValue) && selectedValue.some(e => e == option.value))"
:data-selected="option.value == selectedValue || (Array.isArray(selectedValue) && selectedValue.some(e => e == option.value))"