Skip to content
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

Merged
merged 1 commit into from
Apr 19, 2017
Merged

Change value-assignment to a setValue call #5147

merged 1 commit into from
Apr 19, 2017

Conversation

wexo-team
Copy link

@wexo-team wexo-team commented Jun 22, 2016

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.

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.
@daim2k5
Copy link
Contributor

daim2k5 commented Jun 23, 2016

@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.

@wexo-team
Copy link
Author

Hey,
I can't seem to sign it, same issue as in here:
#5070

@okorshenko
Copy link
Contributor

@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.
Thank you

@wexo-team
Copy link
Author

@okorshenko thanks for the notice.
Have signed the CLA now.

@magento-team
Copy link
Contributor

@wexo-dk thank you for your contribution

magento-engcom-team pushed a commit that referenced this pull request Dec 20, 2019
[TSG-Commerce] Tests for 2.4 (pr1) (2.4-develop)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants