-
Notifications
You must be signed in to change notification settings - Fork 62
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
ix-select does not allow looping over array of objects anymore since v2.2.0 #1270
Comments
@raphaelgodart We discussed this and your are right. We will try to provide a solution that object as value is still possible as it is implemented with the native select. But we have to check if additional issue are existing regarding the comparison between |
@matthiashader I reviewed PR #1287. Do I understand correctly that it reverts the breaking change which was introduced in v2.2.0 but that in v3.0.0 strings will again be mandatory, and that object iteration will not be possible anymore in v3.0.0? |
Yes it is still planned. We try to get closes to the html standard (https://html.spec.whatwg.org/multipage/form-elements.html#the-select-element)
to be compatible with standard Here a html example: https://stackblitz.com/edit/stackblitz-starters-ds7jcc?file=index.html which shows the issue regarding working with objects |
Prerequisites
What happened?
Since iX v2.2.0 the value property of ix-select-item must be a string. That is enforced by this PR: #1159
That change has broken our implementation, as we're using ix-select and ix-select-item to display a select box of object from an array.
Due to the changes in PR #1159, since ix v2.2.0, the selected item is not displayed anymore in the select box in our implementation. I've created a Stackblitz to illustrate the problem: https://stackblitz.com/edit/siemens-ix-select-issues. In the Stackblitz:
Example 3 makes ix-select work with objects, given that the objects have a property of type string that can be used as ix-select-item value. However, extra code must be added to the valueChange handler to get the object from the original array.
Is ix-select supposed to behave this way? Is it expected from users that such extra code must be written in the valueChange handler to get the selected object?
What type of frontend framework are you seeing the problem on?
Angular
Which version of iX do you use?
v2.2.0
Code to produce this issue.
The text was updated successfully, but these errors were encountered: