File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -32,6 +32,11 @@ const { t } = useI18n()
3232const isExpanded = shallowRef (false )
3333const showAllKeywords = shallowRef (false )
3434
35+ const filterText = computed ({
36+ get : () => props .filters .text ,
37+ set : value => emit (' update:text' , value ),
38+ })
39+
3540const displayedKeywords = computed (() => {
3641 const keywords = props .availableKeywords ?? []
3742 return showAllKeywords .value ? keywords : keywords .slice (0 , 20 )
@@ -130,11 +135,6 @@ function getSecurityLabelKey(value: SecurityFilter): string {
130135 return securityLabelKeys .value [value ]
131136}
132137
133- function handleTextInput(event : Event ) {
134- const target = event .target as HTMLInputElement
135- emit (' update:text' , target .value )
136- }
137-
138138// Compact summary of active filters for collapsed header using operator syntax
139139const filterSummary = computed (() => {
140140 const parts: string [] = []
@@ -242,13 +242,12 @@ const hasActiveFilters = computed(() => !!filterSummary.value)
242242 <InputBase
243243 id =" filter-search"
244244 type =" text"
245- :value = " filters.text "
245+ v-model = " filterText "
246246 :placeholder =" searchPlaceholder"
247247 autocomplete =" off"
248248 class =" w-full min-w-25"
249249 size =" medium"
250250 no-correct
251- @input =" handleTextInput"
252251 />
253252 </div >
254253
You can’t perform that action at this time.
0 commit comments