Radio Button and CollectionView together do not work correctly #22913
Labels
area-controls-collectionview
CollectionView, CarouselView, IndicatorView
area-controls-radiobutton
RadioButton, RadioButtonGroup
platform/android 🤖
platform/iOS 🍎
s/needs-repro
Attach a solution or code which reproduces the issue
t/bug
Something isn't working
Description
The radio group SelectedValue binding does not set any radio buttons to the selected state. I have a page that needs to show the currently selected item when it is displayed but there seems to be nothing I can do to make this happen. Clicking any radio button does set the SelectedValue as expected so that direction works at least. If I change the CollectionView to a VerticalStackLayout and use the BindableLayout attribute instead of the CollectionView ones, it all works, bindings work in both directions, my initial radio button selection is selected and all is fine.
The other issue with CollectionView with Radio buttons is that when selecting buttons one by one from the bottom to the top, the very top button takes 2 taps to make it selected. Again, switching to VerticalStackLayout (BindableLayout) solves this issue too.
.Net 8.0
Visual Studio 2022 version 17.10
Maui.Controls (8.0.40)
Maui.Controls.Compatability (8.0.40)
Community.Toolkit.Maui (9.0.0)
Steps to Reproduce
Link to public reproduction project repository
No response
Version with bug
8.0.21 SR4.1
Is this a regression from previous behavior?
No, this is something new
Last version that worked well
Unknown/Other
Affected platforms
iOS, Android
Affected platform versions
No response
Did you find any workaround?
Yes, switch out CollectionView for VerticalStackLayout as shown below.
Relevant log output
No response
The text was updated successfully, but these errors were encountered: