autofocus not applying to p-dropdown while nested in a p-dialog for PrimeNG 16.9.10 #2049
Unanswered
garybconsult
asked this question in
PrimeNG
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have a p-dialog that has several nested p-dropdowns and buttons. The dialog shows and hides correctly, however I'm unable to set the autofocus on any of the p-dropdowns for version 16.9
Example here:
https://stackblitz.com/edit/ytcvxy-rtznat?file=src%2Fapp%2Fdemo%2Fdropdown-basic-demo.html
I have tried the same example with older versions and with the newest version 17, but they work correctly as shown here:
https://stackblitz.com/edit/owhhxd?file=src%2Fapp%2Fdropdown-basic-demo.ts
The same code was used in both:
<p-dropdown
pAutoFocus
[autofocus]="true"
[options]="cities"
[(ngModel)]="selectedCity"
optionLabel="name"
[showClear]="true"
placeholder="Select a City"
>
however version 16 doesn't work but 17 does. Is there a workaround for now until we can get upgraded to 17? We are planning on upgrading, but it will be several months before we get there.
Beta Was this translation helpful? Give feedback.
All reactions