-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Fix the FilePicker.PickMultipleAsync() Not Returning Null When Canceled #27961
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
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 tasks
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 3 out of 10 changed files in this pull request and generated 3 comments.
Files not reviewed (7)
- src/Essentials/src/PublicAPI/net-android/PublicAPI.Shipped.txt: Language not supported
- src/Essentials/src/PublicAPI/net-ios/PublicAPI.Shipped.txt: Language not supported
- src/Essentials/src/PublicAPI/net-maccatalyst/PublicAPI.Shipped.txt: Language not supported
- src/Essentials/src/PublicAPI/net-tizen/PublicAPI.Shipped.txt: Language not supported
- src/Essentials/src/PublicAPI/net-windows/PublicAPI.Shipped.txt: Language not supported
- src/Essentials/src/PublicAPI/net/PublicAPI.Shipped.txt: Language not supported
- src/Essentials/src/PublicAPI/netstandard/PublicAPI.Shipped.txt: Language not supported
Comments suppressed due to low confidence (1)
src/Essentials/src/FilePicker/FilePicker.uwp.cs:43
- Ensure that there is a test case that covers the scenario where resultList.Count == 0 and the method returns null.
return resultList.Count == 0 ? null : resultList.Select(storageFile => new FileResult(storageFile));
1a4ac3e
to
517f10d
Compare
517f10d
to
36dfc3e
Compare
jsuarezruiz
approved these changes
Mar 11, 2025
36dfc3e
to
e0eea1c
Compare
/rebase |
e0eea1c
to
02e847d
Compare
/azp run |
Azure Pipelines successfully started running 3 pipeline(s). |
rmarinho
approved these changes
Mar 20, 2025
🚨 API change(s) detected @davidbritch FYI |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
area-essentials
Essentials: Device, Display, Connectivity, Secure Storage, Sensors, App Info
community ✨
Community Contribution
partner/syncfusion
Issues / PR's with Syncfusion collaboration
t/breaking 💥
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Issue Details
If the user cancels the file picking, the result must be null. However, FilePicker.PickMultipleAsync() does not return a null value.
Root Cause
The method currently returns a file result value even when the user cancels the file pick operation.
Description of Change
Modify the FilePicker.PickMultipleAsync() method to be nullable and return null when the user cancels the file pick operation.
Validated the behavior in the following platforms
Issues Fixed
Fixes #27710
Output ScreenShot
BeforeFix.mov
AfterFix.1.mov