-
Notifications
You must be signed in to change notification settings - Fork 1.9k
[Windows] Fixed CollectionView throws NRE when value of IsGrouped property is changed to false #27331
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
base: main
Are you sure you want to change the base?
Conversation
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 4 changed files in this pull request and generated 1 comment.
Files not reviewed (1)
- src/Controls/tests/TestCases.HostApp/Issues/Issue17864.xaml: Language not supported
Comments suppressed due to low confidence (1)
src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue17864.cs:22
- Add a check to ensure that the CollectionView is correctly updated after the IsGrouped property changes.
App.WaitForElement(CollectionView);
public void CollectionViewShouldNotCrashWhenIsGroupedChanges() | ||
{ | ||
App.WaitForElement(CollectionView); | ||
App.Tap("Button"); |
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.
Ensure that the AutomationId for 'Button' is unique and not reused, or WaitForElement will fail to find the correct element.
Copilot uses AI. Check for mistakes.
/azp run |
Azure Pipelines successfully started running 3 pipeline(s). |
/rebase |
fa90e42
to
64f07b9
Compare
/azp run |
Azure Pipelines successfully started running 3 pipeline(s). |
/rebase |
64f07b9
to
8ee52ca
Compare
/rebase |
8ee52ca
to
5560feb
Compare
/rebase |
5560feb
to
7dc3dea
Compare
/azp run |
Azure Pipelines successfully started running 3 pipeline(s). |
Issue Details
NullReference exception is thrown when disabling IsGrouped at runtime.
Root Cause
The value passed as the itemsource when creating a groupItemsList is not IEnumerable. This causes the value to be set as null.
Description of Change
Ensured the value is of type IEnumerable and pass it to Create method of TemplatedItemSourceFactory to avoid null reference exceptions.
Validated the behaviour in the following platforms
Issues Fixed
Fixes #17864
Fixes #28824
Output
Before.mp4
After.mp4