primefaces / primevue

Next Generation Vue UI Component Library
https://primevue.org
MIT License
9.98k stars 1.2k forks source link

Listbox: OptionGroup disappear with filter #6233

Open lilhottied opened 1 month ago

lilhottied commented 1 month ago

Describe the bug

The problem is if I use optionGroups and Filter within the same Listbox component, When I filter, the filtered value hasn't render the optionGroups. Is there any solution for this?

Reproducer

https://stackblitz.com/edit/qshngr?file=src%2FApp.vue

PrimeVue version

4.0.0-rc.2

Vue version

4.x

Language

ES6

Build / Runtime

Vite

Browser(s)

All

Steps to reproduce the behavior

  1. Click on the Listbox component.
  2. Enter the desired value in the search filter input field.
  3. Check the result: Notice that the optionGroups are not displayed.

Expected behavior

  1. Click on the Listbox component.
  2. Enter the desired value in the search filter input field.
  3. Check the result: The optionGroup labels corresponding to each optionChild should be displayed.
avramz commented 1 month ago

Can reproduce, fix in PR