-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
Change value-assignment to a setValue call #5147
Conversation
Is there any reasons not to use Prototype's setValue call instead of assignment? Plain assignment breaks in case of a multiselect element. In case of multiselect, and an array in rowData.column_values[rowInputElementNames[i]] the first element of that array will be taken and assigned as the only selected value on a multiselect, which is clearly a broken behaviour. Prototype's setValue call will handle this case properly without breaking compatibility.
@wexo Thank you for your contribution. Please accept the contributors license agreement so this PR can be further processed. This can be done by clicking the "Details" link next to the "license/cla" check below. |
Hey, |
@wexo-dk could you please make sure that your commit signed with the same email as you have on GitHub. This will allow you to sign CLA. |
@okorshenko thanks for the notice. |
@wexo-dk thank you for your contribution |
[TSG-Commerce] Tests for 2.4 (pr1) (2.4-develop)
Is there any reason not to use Prototype's setValue call instead of assignment?
Plain assignment breaks in case of a multiselect element.
In case of multiselect, and an array in
rowData.column_values[rowInputElementNames[i]]
the first element of that array will be taken and assigned as the only selected value on a multiselect, which is clearly a broken behaviour.
Prototype's setValue call will handle this case properly without breaking compatibility.