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 SelectedItem set to null on Popup #14832
Comments
I think it is similar to but I don't know why it has been closed |
We've added this issue to our backlog, and we will work to address it as time and resources allow. If you have any additional information or questions about this issue, please leave a comment. For additional info about issue management, please read our Triage Process. |
Is this an issue with the Picker control or in the community toolkit as you mentioned it works fine with on a ContentPage correct? |
The problem is the picker in the popup. In the contentpage it works |
@jamesmontemagno I have the same problem with a custom "region" navigation. So I have subviews loaded into a "region" control, which is really just a ContentView. If the picker is inside the region it gets nulled. If its inside the mainpage or view it is initialized correctly. public async override void NavigatedTo(object parameter = null)
{
if(SelectedItem != null)
{
SelectedProvider = Provider.First(x => x == SelectedItem.Provider);
SelectedGroup = SelectedItem?.GroupID == null ? null : Groups.First(x => x.ID == SelectedItem.GroupID);
}
base.NavigatedTo(parameter);
} @acaliaro I dont know if its possible for you to use a similar workaround. |
I think no... |
Hi, there are some news about this? |
Verified this on Visual Studio Enterprise 17.7.0 Preview 2.0. Repro on iOS 16.4 and iPad 16.4 with below Project: |
Description
I'm trying to initialize the SelectedItem of a picker. If they are in a Page, initialization is successful. If I try to do the same initialization in a Popup, the SelectedItem is first set correctly, but then it is set to null.
Steps to Reproduce
1 Open the solution
2 Run it on an iPad
3 the Picker on the page is set to Outlet1
4 Press the button
5 The picker on the popup is not set
Link to public reproduction project repository
https://github.com/acaliaro/MauiPicker
Version with bug
7.0 (current)
Last version that worked well
Unknown/Other
Affected platforms
iOS
Affected platform versions
iPad 15.7
Did you find any workaround?
No, any workaround found
Relevant log output
[0:] OnSelectedItemOutletChanged: Outlet1 [0:] OnSelectedItemOutletChanged: value = null This is the OnSelectedItemOutletChanged in the popup
The text was updated successfully, but these errors were encountered: