Skip to content
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

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

NirmalKumarYuvaraj
Copy link
Contributor

@NirmalKumarYuvaraj NirmalKumarYuvaraj commented Jan 24, 2025

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

  • Android
  • Windows
  • iOS
  • Mac

Issues Fixed

Fixes #17864

Output

Before After
Before.mp4
After.mp4

@dotnet-policy-service dotnet-policy-service bot added the community ✨ Community Contribution label Jan 24, 2025
@karthikraja-arumugam karthikraja-arumugam added the partner/syncfusion Issues / PR's with Syncfusion collaboration label Jan 24, 2025
@NirmalKumarYuvaraj NirmalKumarYuvaraj marked this pull request as ready for review January 27, 2025 10:27
@Copilot Copilot bot review requested due to automatic review settings January 27, 2025 10:27
@NirmalKumarYuvaraj NirmalKumarYuvaraj requested a review from a team as a code owner January 27, 2025 10:27
Copy link
Contributor

@Copilot Copilot AI left a 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");
Copy link
Preview

Copilot AI Jan 27, 2025

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.

Positive Feedback
Negative Feedback

Provide additional feedback

Please help us improve GitHub Copilot by sharing more details about this comment.

Please select one or more of the options
@jsuarezruiz
Copy link
Contributor

/azp run

Copy link

Azure Pipelines successfully started running 3 pipeline(s).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
community ✨ Community Contribution partner/syncfusion Issues / PR's with Syncfusion collaboration
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Windows] CollectionView throws NRE when value of IsGrouped property is changed to false
3 participants