From 281f3227a93ee99797210d5ef8267d01d09921a8 Mon Sep 17 00:00:00 2001 From: tugcekucukoglu Date: Tue, 12 Nov 2024 10:56:14 +0300 Subject: [PATCH] Fixed #6641 --- packages/primevue/src/listbox/Listbox.d.ts | 4 ++++ packages/primevue/src/listbox/Listbox.vue | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/primevue/src/listbox/Listbox.d.ts b/packages/primevue/src/listbox/Listbox.d.ts index 9d7531e10..e43de6ac0 100755 --- a/packages/primevue/src/listbox/Listbox.d.ts +++ b/packages/primevue/src/listbox/Listbox.d.ts @@ -109,6 +109,10 @@ export interface ListboxFilterEvent { * Filter value */ value: string; + /** + * Filtered options + */ + filterValue: any[]; } /** diff --git a/packages/primevue/src/listbox/Listbox.vue b/packages/primevue/src/listbox/Listbox.vue index b2a473ac3..33b69bf4a 100755 --- a/packages/primevue/src/listbox/Listbox.vue +++ b/packages/primevue/src/listbox/Listbox.vue @@ -411,7 +411,7 @@ export default { } }, onFilterChange(event) { - this.$emit('filter', { originalEvent: event, value: event.target.value }); + this.$emit('filter', { originalEvent: event, value: event.target.value, filterValue: this.visibleOptions }); this.focusedOptionIndex = this.startRangeIndex = -1; }, onFilterBlur() {