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

Picker Selected item gets cleared in BindableLayout (Android, iOS) - Bug introduced in Microsoft.Maui.Controls 8.0.60 #25729

Open
mahesh139 opened this issue Nov 7, 2024 · 8 comments · May be fixed by #26777
Assignees
Labels
area-controls-picker Picker i/regression This issue described a confirmed regression on a currently supported version p/0 Work that we can't release without platform/android 🤖 platform/iOS 🍎 s/triaged Issue has been reviewed s/verified Verified / Reproducible Issue ready for Engineering Triage t/bug Something isn't working
Milestone

Comments

@mahesh139
Copy link

mahesh139 commented Nov 7, 2024

Description

  • I have a bindlable layout that changes its item source conditionally.
  • When picker is used inside bindable layout, its value gets cleared when switching item source.
  • Bug in provided repo was introduced in Microsoft.Maui.Controls 8.0.60, same repo works fine with Microsoft.Maui.Controls 8.0.40

Microsoft.Maui.Controls 8.0.60 has introduced some real problems with Bindable Layout.
e.g. CommunityToolkit/Maui#2320

Migration of my App from Xamarin forms to MAUI is never ending.....:( Please help.

Steps to Reproduce

  • Please open and run project in provided repo
  • Click on Picker BUG at the bottom of the page.
  • Click on "Section 1" and "Section 2" buttons to switch between sections.
  • Select picker value of your choice for both sections and switch between sections.
  • Picker value gets cleared while switching between section.
  • Same Repo is working fine with Microsoft.Maui.Controls 8.0.40
  • I hope following video helps with re-production steps.
Bindable.Layout.Picker.mp4

Link to public reproduction project repository

https://github.com/mahesh139/MAUIBugs

Version with bug

8.0.92 SR9.2

Is this a regression from previous behavior?

Yes, this used to work in .NET MAUI

Last version that worked well

8.0.40 SR5

Affected platforms

iOS, Android

Affected platform versions

Android 13,14. iOS 15

Did you find any workaround?

No.

Relevant log output

No response

@mahesh139 mahesh139 added the t/bug Something isn't working label Nov 7, 2024
Copy link

We've found some similar issues:

If any of the above are duplicates, please consider closing this issue out and adding additional context in the original issue.

Note: You can give me feedback by 👍 or 👎 this comment.

@mahesh139 mahesh139 changed the title Picker Selected item gets cleared in bindable layout (Android, iOS) - Bug introduced in Microsoft.Maui.Controls 8.0.60 Picker Selected item gets cleared in BindableLayout (Android, iOS) - Bug introduced in Microsoft.Maui.Controls 8.0.60 Nov 8, 2024
@Ying-6 Ying-6 added the i/regression This issue described a confirmed regression on a currently supported version label Nov 8, 2024
@Ying-6
Copy link

Ying-6 commented Nov 8, 2024

This issue has been verified using Visual Studio 17.12.0 Preview 5.0(8.0.92 & 8.0.60 & 8.0.40 & 9.0.0-rc.2.24503.2). Can repro this issue on android and iOS platforms. Works fine on 8.0.40.

@Ying-6 Ying-6 added platform/android 🤖 platform/iOS 🍎 s/triaged Issue has been reviewed s/verified Verified / Reproducible Issue ready for Engineering Triage labels Nov 8, 2024
@rmarinho
Copy link
Member

rmarinho commented Nov 8, 2024

This is fixed by #23369 and should be working on 8.0.70 or above

@rmarinho rmarinho closed this as completed Nov 8, 2024
@mahesh139
Copy link
Author

@rmarinho Provided repo is developed with latest version 8.0.92 SR9.2 and its not working. please re-open.

@rmarinho rmarinho reopened this Nov 8, 2024
@rmarinho rmarinho added potential-regression This issue described a possible regression on a currently supported version., verification pending and removed fixed-in-8.0.70 labels Nov 8, 2024
@rmarinho rmarinho added this to the .NET 9 SR1.1 milestone Nov 8, 2024
@rmarinho rmarinho added the p/0 Work that we can't release without label Nov 8, 2024
@jsuarezruiz jsuarezruiz removed the potential-regression This issue described a possible regression on a currently supported version., verification pending label Nov 11, 2024
@LeoJHarris
Copy link

Is this the same as when scrolling through a CollectionView and scrolling back up that any pickers contained in the CollectionView cells get their selected values cleared? My only work around is to use a ListView with RetainElement set to true,

@mahesh139
Copy link
Author

mahesh139 commented Nov 13, 2024

@LeoJHarris Not sure if its related but I also observed behavior you mentioned. when picker is used inside collection view, selected item gets cleared on collection view scroll.

Picker selected value also gets cleared if you switch collection view item source. (same as original issue reported for bindable layout).

I am going to log a separate issue for collection view with a re-production repo.

@LeoJHarris
Copy link

@mahesh139 I have just created a ticket from the issue regarding CollectionView and nested Pickers #25842

@kubaflo
Copy link
Contributor

kubaflo commented Nov 17, 2024

#25842 (comment)

@PureWeen PureWeen modified the milestones: .NET 9 SR1.1, .NET 9 SR2 Nov 25, 2024
@PureWeen PureWeen moved this from Todo to In Progress in MAUI SDK Ongoing Nov 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-controls-picker Picker i/regression This issue described a confirmed regression on a currently supported version p/0 Work that we can't release without platform/android 🤖 platform/iOS 🍎 s/triaged Issue has been reviewed s/verified Verified / Reproducible Issue ready for Engineering Triage t/bug Something isn't working
Projects
Status: In Progress
Development

Successfully merging a pull request may close this issue.

8 participants