Skip to content

Commit 030d54b

Browse files
- FIX: Fixed issue with trait dropdown expanding previously collapsed groups.
1 parent 525ee9c commit 030d54b

1 file changed

Lines changed: 10 additions & 2 deletions

File tree

src/components/trial/TraitDropdown.vue

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -239,8 +239,16 @@
239239
menuShown.value = false
240240
}
241241
242-
watch(traitsByGroup, async newValue => {
243-
openedGroups.value = newValue.map(g => g.name)
242+
watch(() => compProps.traitGroupOrder, async newValue => {
243+
if (newValue) {
244+
openedGroups.value = newValue.concat()
245+
246+
if (compProps.traits.some(t => !t.group || !t.group.name)) {
247+
openedGroups.value.unshift(t('dropdownOptionTraitNoGroup'))
248+
}
249+
} else {
250+
openedGroups.value = []
251+
}
244252
}, { immediate: true })
245253
246254
defineExpose({

0 commit comments

Comments
 (0)