-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
[Windows] Fixed CollectionView throws NRE when value of IsGrouped property is changed to false #27331
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 is powered by AI, so mistakes are possible. Review output carefully before use.
/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
Output
Before.mp4
After.mp4