primevue
primevue copied to clipboard
Multiselect: Menu closes on select
Describe the bug
I want to display the selected options at the top of the list. I therefore sort the selected options to the top.
If I now click on something further down in the menu, it is automatically sorted to the top. At the same time, the menu closes by mistake. The menu should remain open.
Cause of the error: Since I use the virtualscroller, not all options are rendered in the html. Therefore the outsideClickListener does not find the clicked option and thinks it was a click outside the menu. The menu is then incorrectly closed.
Reproducer
https://stackblitz.com/edit/lictaz?file=src%2FApp.vue
PrimeVue version
3.41.0
Vue version
3.x
Language
ES6
Build / Runtime
Vite
Browser(s)
No response
Steps to reproduce the behavior
Open Menu Scroll Down Select an option => Menu will close
Expected behavior
Menu should stay open as long as I dont click outside.