Skip to content

Commit

Permalink
Merge pull request #6510 from avramz/fix/select-autofocus
Browse files Browse the repository at this point in the history
#6420 fix: Select: autoFilterFocus stuck when switching between Selects
  • Loading branch information
tugcekucukoglu authored Oct 2, 2024
2 parents e7b99ef + a1fecdb commit 798fedd
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/primevue/src/select/Select.vue
Original file line number Diff line number Diff line change
Expand Up @@ -689,7 +689,9 @@ export default {
this.alignOverlay();
this.scrollInView();

this.autoFilterFocus && focus(this.$refs.filterInput.$el);
setTimeout(() => {
this.autoFilterFocus && focus(this.$refs.filterInput.$el);
}, 1);
},
onOverlayAfterEnter() {
this.bindOutsideClickListener();
Expand All @@ -705,6 +707,7 @@ export default {

this.autoFilterFocus && focus(this.$refs.focusInput);
this.$emit('hide');

this.overlay = null;
},
onOverlayAfterLeave(el) {
Expand Down

0 comments on commit 798fedd

Please sign in to comment.