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

Ensure GroupValueChangedMessage is received #5646

Merged
merged 3 commits into from
Apr 8, 2022

Conversation

cshung
Copy link
Member

@cshung cshung commented Mar 29, 2022

Description of Change

There are three fixes in this change.

  1. The message registration type is changed from ILayout to Element. This is because _layout in RadioButtonGroupController is actually an instance of Element.

  2. The checking for Value != args.Value is changed to !Value.Equals(args.Value). This is because Value and args.Value can come from different sources and object reference equality often doesn't work.

  3. In case the SelectedValue of the radio group is changed before the radio buttons are added to the group, the radio button missed the event to set its default value and won't set its IsChecked state. Therefore we need to make sure when a radio button is added to the group, it sets its IsChecked state to the correct value.

Issues Fixed

Fixes #5645

@softlion

@cshung cshung requested a review from PureWeen March 29, 2022 19:57
@jfversluis jfversluis added the legacy-area-controls Label, Button, CheckBox, Slider, Stepper, Switch, Picker, Entry, Editor label Mar 30, 2022
@rmarinho rmarinho requested a review from hartez April 6, 2022 16:52
@rmarinho
Copy link
Member

rmarinho commented Apr 6, 2022

@cshung you mind rebase on main, to see if all tests pass. Thanks

@cshung cshung force-pushed the public/ensure-radio-message branch from 6788cf5 to c442ae9 Compare April 6, 2022 17:28
@cshung cshung force-pushed the public/ensure-radio-message branch from ca7cdeb to 4837691 Compare April 8, 2022 05:36
@cshung cshung merged commit cc13c2c into dotnet:main Apr 8, 2022
@cshung cshung deleted the public/ensure-radio-message branch April 8, 2022 16:42
@github-actions github-actions bot locked and limited conversation to collaborators Dec 22, 2023
@samhouts samhouts added the fixed-in-6.0.300-rc.2 Look for this fix in 6.0.300-rc.2! label Aug 2, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
fixed-in-6.0.300-rc.2 Look for this fix in 6.0.300-rc.2! legacy-area-controls Label, Button, CheckBox, Slider, Stepper, Switch, Picker, Entry, Editor
Projects
None yet
Development

Successfully merging this pull request may close these issues.

The default radio button is not selected on startup
5 participants