You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[ x ] bug report => Search github for a similar issue or PR before submitting
[ ] feature request => Please check if request is not on the roadmap already https://github.com/primefaces/primeng/wiki/Roadmap
[ ] support request => Please do not submit support request here, instead see http://forum.primefaces.org/viewforum.php?f=35
Current behavior
When using a select component, such as Dropdown, the selection is limited to a property of the object only but cannot be the whole object.
The issue #9505 discloses that there is a breaking change affecting the templates. However, it also affects how the selection is bound to the control, which now with version 11 only gets a property. This breaks all the submits that before where accepting an object and performing logic with them.
Expected behavior
If the parameter optionValue is not set, the whole object should be bound to the control as it was with version 10.
What is the motivation / use case for changing the behavior?
Breaks all the existing API POST calls in forms.
Please tell us about your environment:
Running in linux with a nginx server.
Angular version: 11
PrimeNG version: 11
Browser: [all | Chrome XX | Firefox XX | IE XX | Safari XX | Mobile Chrome XX | Android X.X Web Browser | iOS XX Safari | iOS XX UIWebView | iOS XX WKWebView ]
Chrome, Firefox, and IE latest versions
Language: all
The text was updated successfully, but these errors were encountered:
Furthermore, the problem lies within the method (in primeng-dropdown.js) getOptionValue(option) { return this.optionValue ? ObjectUtils.resolveFieldData(option, this.optionValue) : (option.value !== undefined ? option.value : option); }
Since all the objects that we use are implementing an interface in the form:
the above function assumes that the value is the property 'value'.
If I am arbitrarily and explicitly defining which property is the value, then such property should be the value, otherwise, it should be the object and not a default magic property... If I wanted 'value' to be the value, I would use optionValue="value".
I'm submitting a ... (check one with "x")
Current behavior
When using a select component, such as Dropdown, the selection is limited to a property of the object only but cannot be the whole object.
The issue #9505 discloses that there is a breaking change affecting the templates. However, it also affects how the selection is bound to the control, which now with version 11 only gets a property. This breaks all the submits that before where accepting an object and performing logic with them.
Expected behavior
If the parameter optionValue is not set, the whole object should be bound to the control as it was with version 10.
What is the motivation / use case for changing the behavior?
Breaks all the existing API POST calls in forms.
Please tell us about your environment:
Running in linux with a nginx server.
Angular version: 11
PrimeNG version: 11
Browser: [all | Chrome XX | Firefox XX | IE XX | Safari XX | Mobile Chrome XX | Android X.X Web Browser | iOS XX Safari | iOS XX UIWebView | iOS XX WKWebView ]
Chrome, Firefox, and IE latest versions
Language: all
The text was updated successfully, but these errors were encountered: