diff --git a/app/gui2/src/components/GraphEditor/widgets/WidgetSelection.vue b/app/gui2/src/components/GraphEditor/widgets/WidgetSelection.vue index dafa63eae389..7c60187801f0 100644 --- a/app/gui2/src/components/GraphEditor/widgets/WidgetSelection.vue +++ b/app/gui2/src/components/GraphEditor/widgets/WidgetSelection.vue @@ -124,9 +124,9 @@ function toggleDropdownWidget() { showDropdownWidget.value = !showDropdownWidget.value } -function onClick(index: number) { +function onClick(index: number, keepOpen: boolean) { selectedIndex.value = index - showDropdownWidget.value = false + showDropdownWidget.value = keepOpen } // When the selected index changes, we update the expression content. @@ -181,7 +181,7 @@ export const widgetDefinition = defineWidget(WidgetInput.isAstOrPlaceholder, { :color="'var(--node-color-primary)'" :values="tagLabels" :selectedValue="selectedLabel" - @click="onClick($event)" + @click="onClick" /> diff --git a/app/gui2/src/components/widgets/DropdownWidget.vue b/app/gui2/src/components/widgets/DropdownWidget.vue index 950504abbb93..e2be7d6b0444 100644 --- a/app/gui2/src/components/widgets/DropdownWidget.vue +++ b/app/gui2/src/components/widgets/DropdownWidget.vue @@ -10,7 +10,7 @@ enum SortDirection { } const props = defineProps<{ color: string; selectedValue: string | undefined; values: string[] }>() -const emit = defineEmits<{ click: [index: number] }>() +const emit = defineEmits<{ click: [index: number, keepOpen: boolean] }>() const sortDirection = ref(SortDirection.none) @@ -51,11 +51,11 @@ const NEXT_SORT_DIRECTION: Record = {