-
Notifications
You must be signed in to change notification settings - Fork 4.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dropdown | Deprecate autoDisplayFirst property #14426
Comments
it's a pity cause scenario like this cannot be used anymore, and they were very useful
|
Documentation needs updating: https://primeng.org/dropdown#api.dropdown.props.autoDisplayFirst |
Isn't ngModel deprecated as well here as well? |
And if I don't want to select any value, what value should I set? Null or undefined? |
It's a really bad change. What if we want to force user to select an item (so we don't want to select firs item) and option list is taken from service? We have to either spread it (option list) with empty|null value and label or use empty string as placeholder now... |
What about async as options now? #14190 (comment) |
Unfortunately this broke our app on our Angular 17 upgrade and was quite annoying to hunt down :( Wish this hadn't been deprecated. |
You can create a custom directive for p-dropdown that will auto display first. Please copy all the code, not just the code in the box. I don't know why it won't register everything as code... import { AfterContentInit, Directive } from '@angular/core'; @directive({ ngAfterContentInit(): void {
} |
autoDisplayFirst
property will be removed in the future because of the maintenance time cost and model value collisions.Instead of the autoDisplayFirst, users can set the value by the model value as shown below.
The text was updated successfully, but these errors were encountered: