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

Fixed SelectControl keys; Removed unnecessary key from RadioControl; #6122

Merged
merged 1 commit into from Apr 12, 2018

Conversation

Projects
None yet
1 participant
@jorgefilipecosta
Member

jorgefilipecosta commented Apr 11, 2018

SelectControl used value as the key, but a user may pass two options with the same value in a select control. Now we use value and label as the pair to create the key.
label key in RadionControl is unnecessary as it is not inside an array.

Passing repeated values to a SelectControl may not make sense, but we should not throw errors even if that happens. In pure HTML an user can have a select with repeated values and no errors happen so using our control the same behavior is expected.

Fixes: #4873

How Has This Been Tested?

Follow the steps described on #4873 and verify no duplicate key errors happen.

Fixed SelectControl keys; Removed unnecessary key from RadioControl;
SelectControl used value as the key, but we may have situations where we have two options with the same value in a select control. Now we use value and label as the pair to create the key.
label key in RadionControl is unnecessary as it is not inside an array.

@jorgefilipecosta jorgefilipecosta self-assigned this Apr 11, 2018

@jorgefilipecosta jorgefilipecosta merged commit 783e308 into master Apr 12, 2018

2 checks passed

codecov/project 44.54% remains the same compared to 1325bae
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@jorgefilipecosta jorgefilipecosta deleted the fix/select-control-option-keys branch Apr 12, 2018

@jorgefilipecosta jorgefilipecosta added this to the 2.7 milestone Apr 13, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment