-
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
Ability to define optionValue, optionDisabled, optionGroup in Select components #4295
Comments
FWIW: I was able to workaround this by using/modifying the method located in
This way you can pas in an Object[] and specify both the label and the value. |
is there any option to set string to dropdown value instead of passing entire object? |
any ETA on this, can I make a pull request to fix it? thanks in advance |
same issue in autocomplete |
You can find it implemented here in the meantime, I'll try to keep my branch up to date: |
is the new feature not yet deployed ? |
Hello @yelhouti this can already be used from the version 8.0.0? |
primeng team refused to merge my PR, so I deployed it in my fork, to use it, use this instead of the version number in your package:
|
I do not understand, there are many issus open with this same request and several people would certainly use this feature and yet the primeng people do not give us answers or accept implementations. Why that @cagataycivici ?? |
some news @cagataycivici ? |
@yelhouti, did the prime team provide any explanation while refusing your PR? |
yes: company policy |
@cagataycivici thanks for assigning this, you people rock! |
PrimeReact and PrimeVue has optionValue so PrimeNG will get it in 9.0.1 as well. Applies to Dropdown, MultiSelect, SelectButton and Listbox |
Moved to 9.1.0 as 9.0.x is for maintenance and 9.1.x is for new stuff like this, new Galleria, Virtual Scroll Tree... |
Any ETA for this please? just wondering to know when to upgrade my fork :) thanks |
9.1.0 is already packed with features and enhancements and this issue deserves more attention so moving to PrimeNG 10 which is not too far away. |
Thanks cagataycivici, It's a really important feature. We need to do lot of hacks to work around it. This is very basic thing missing. Looking forward to PrimNG10 |
Hey all, scheduled for 10.1.0, this one has high priority. |
I really welcome this change. I hadn't realised that you can intercept the change by using Maybe it'll help someone until we get this. |
we are waiting for the new version |
@cagataycivici will the feature be available for Auto complete components as well? I saw the tagging for SelectButton, Multi select and list box. Thanks |
@cagataycivici I hope you are well, I am on version 10 of PrimeNG and I have tried everything that works, bring the value (id) of the object and I tried this last change that you showed in your image but it does not work, this was already released in the last version ? |
same here v10 but Ok Its working in version 11 |
There is no guarantee in receiving a response in GitHub Issue Tracker, If you'd like to secure our response, you may consider PrimeNG PRO Support where support is provided within 4 business hours
I'm submitting a ... (check one with "x")
Plunkr Case
http://plnkr.co/edit/GuEdxXOOClLs2RoeExJd?p=preview
Current behavior
Field 'value' from SelectItem is set in ngModel / FormControl.
When using an object array as options (#4274) the object is set instead.
Expected behavior
Since we already have optionLabel when using an object array as options, it would be greatly appreciated if we could define an optionValue in order to select a field of the object instead of the whole object (id for example).
What is the motivation / use case for changing the behavior?
Being able to use an array of objects as options for Dropdown and similar components but still be able to set only one of the object fields as the input value.
The text was updated successfully, but these errors were encountered: