@@ -5,7 +5,7 @@ import type { Filtering } from '@/components/ComponentBrowser/filtering'
5
5
import SvgIcon from ' @/components/SvgIcon.vue'
6
6
import VirtualizedList from ' @/components/VirtualizedList.vue'
7
7
import { groupColorStyle } from ' @/composables/nodeColors'
8
- import { useSuggestionDbStore } from ' @/stores/suggestionDatabase'
8
+ import { GroupInfo , useSuggestionDbStore } from ' @/stores/suggestionDatabase'
9
9
import { tryGetIndex } from ' @/util/data/array'
10
10
import { computed , ref , toRef , watch } from ' vue'
11
11
import type { ComponentExposed } from ' vue-component-type-helpers'
@@ -48,11 +48,12 @@ watch(selectedGroupIndex, () => (selectedComponentIndex.value = 0))
48
48
const suggestionDbStore = useSuggestionDbStore ()
49
49
const components = computed (() => makeComponentList (suggestionDbStore .entries , props .filtering ))
50
50
const currentGroups = computed (() => {
51
- return Array .from (components .value .keys (), (id ) => ({
51
+ return Array .from (components .value .entries (), ([ id , components ] ) => ({
52
52
id ,
53
53
... (id === ' all' ? { name: ' all' }
54
54
: id === ' suggestions' ? { name: ' suggestions' }
55
55
: (suggestionDbStore .groups [id ] ?? { name: ' unknown' })),
56
+ ... (props .filtering .pattern != null ? { displayedNumber: components .length } : {}),
56
57
}))
57
58
})
58
59
const displayedGroupId = computed (() =>
@@ -111,7 +112,9 @@ defineExpose({
111
112
:debounceMouseSelection =" MOUSE_SELECTION_DEBOUNCE"
112
113
>
113
114
<div class =" groupEntry" >
114
- <span class =" groupEntryLabel" >{{ group.name }}</span >
115
+ <span class =" groupEntryLabel" >
116
+ {{ group.name }}{{ group.displayedNumber ? ` (${group.displayedNumber})` : '' }}
117
+ </span >
115
118
<SvgIcon v-if =" selected" class =" groupEntryIcon" name =" folder_closed" />
116
119
</div >
117
120
</VirtualizedList >
0 commit comments