primevue
primevue copied to clipboard
Select.vue - TypeError: Cannot read properties of null (reading '$el') on closing select
Describe the bug
When filter is on and autoFilterFocus as well then on closing the select it wants to focus the filterInput. But the filterInput is null.
I don't see why filterInput needs to be focused at all when closing the select.
It's caused by this line:
https://github.com/primefaces/primevue/blob/9d9ae356d07e599163a6b4b801c7a74f570a80cd/packages/primevue/src/select/Select.vue#L710
Reproducer
https://stackblitz.com/edit/primevue-4-vite-issue-template-ajtkvm?file=src%2Fmain.js
PrimeVue version
4.1.0
Vue version
4.x
Language
TypeScript
Build / Runtime
Vite
Browser(s)
Chrome 129.0.6668.70
Steps to reproduce the behavior
Open the select and close it by clicking next to it.
Expected behavior
Not to focus the filterInput when closing the select.