-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Fixed Picker Items are not Displaying on macOS platform #27535
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 Picker Items are not Displaying on macOS platform #27535
Conversation
Hey there @NanthiniMahalingam! Thank you so much for your PR! Someone from the team will get assigned to your PR shortly and we'll get it reviewed. |
/azp run |
Azure Pipelines successfully started running 3 pipeline(s). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.
/azp run |
Azure Pipelines successfully started running 3 pipeline(s). |
/azp run |
Azure Pipelines successfully started running 3 pipeline(s). |
/rebase |
0cac32a
to
c4c4b02
Compare
@@ -50,7 +50,7 @@ void DisplayAlert(MauiPicker uITextField) | |||
pickerView.Model = new PickerSource(this); | |||
pickerView?.ReloadAllComponents(); | |||
|
|||
var pickerController = UIAlertController.Create(VirtualView.Title, "", UIAlertControllerStyle.ActionSheet); | |||
var pickerController = UIAlertController.Create("", "", UIAlertControllerStyle.ActionSheet); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this doesn't look like a proper fix, but a hack to get it working
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @StephaneDelcroix ,
- On the macOS native platform, when setting the title in a UIAlertController, only the title is displayed, rather than any subview added to the UIAlertController.
- However, when setting an empty string as the title in UIAlertController, the added subview is displayed as expected.
- Similarly, in the .NET MAUI macOS platform, a UIAlertController displays a UIPickerView added as a subview. When setting the title as an empty string, the UIPickerView subview behaves like its native macOS.


title and logo are gone in the 'after'. is this what we want ? |
Hi @StephaneDelcroix Yes, we want the picker items to be displayed without the title and logo. |
/rebase |
c4c4b02
to
ea4d6cb
Compare
/azp run |
Azure Pipelines successfully started running 3 pipeline(s). |
Added the output image on windows platform
ea4d6cb
to
0d996ad
Compare
/azp run |
Azure Pipelines successfully started running 3 pipeline(s). |
|
||
[Test] | ||
[Category(UITestCategories.Picker)] | ||
public void ShouldDisplayPickerItemsWhenOpeningPicker() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/azp run |
Azure Pipelines successfully started running 3 pipeline(s). |
/azp run MAUI-UITests-public |
Azure Pipelines successfully started running 1 pipeline(s). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bump
* Fixed the picker view items source does not display on mac platform * Added the test case * Added the output images. * Fixed the picker view items source does not display on mac platform * Added the test case * Added the output images. * Create ShouldDisplayPickerItemsWhenOpeningPicker.png Added the output image on windows platform * Ignore the test case on catalyst platform * Added the test case for mac platform * Added the macOS output image * Added the comment line for fix.
* Fixed the picker view items source does not display on mac platform * Added the test case * Added the output images. * Fixed the picker view items source does not display on mac platform * Added the test case * Added the output images. * Create ShouldDisplayPickerItemsWhenOpeningPicker.png Added the output image on windows platform * Ignore the test case on catalyst platform * Added the test case for mac platform * Added the macOS output image * Added the comment line for fix.
* Fixed the picker view items source does not display on mac platform * Added the test case * Added the output images. * Fixed the picker view items source does not display on mac platform * Added the test case * Added the output images. * Create ShouldDisplayPickerItemsWhenOpeningPicker.png Added the output image on windows platform * Ignore the test case on catalyst platform * Added the test case for mac platform * Added the macOS output image * Added the comment line for fix.
* Fixed the picker view items source does not display on mac platform * Added the test case * Added the output images. * Fixed the picker view items source does not display on mac platform * Added the test case * Added the output images. * Create ShouldDisplayPickerItemsWhenOpeningPicker.png Added the output image on windows platform * Ignore the test case on catalyst platform * Added the test case for mac platform * Added the macOS output image * Added the comment line for fix.
* Fixed the picker view items source does not display on mac platform * Added the test case * Added the output images. * Fixed the picker view items source does not display on mac platform * Added the test case * Added the output images. * Create ShouldDisplayPickerItemsWhenOpeningPicker.png Added the output image on windows platform * Ignore the test case on catalyst platform * Added the test case for mac platform * Added the macOS output image * Added the comment line for fix.
* Fixed the picker view items source does not display on mac platform * Added the test case * Added the output images. * Fixed the picker view items source does not display on mac platform * Added the test case * Added the output images. * Create ShouldDisplayPickerItemsWhenOpeningPicker.png Added the output image on windows platform * Ignore the test case on catalyst platform * Added the test case for mac platform * Added the macOS output image * Added the comment line for fix.
Issue Details
Root Cause
Description of Change
Issues Fixed
Fixes #27474,
Fixes #15954,
Fixes #18015
Validated the behaviour in the following platforms
Output
macOS platform
mac_Before_27474.mov
mac_After_27474.mov