diff --git a/src/Controls/src/Core/Handlers/Items/iOS/SelectableItemsViewController.cs b/src/Controls/src/Core/Handlers/Items/iOS/SelectableItemsViewController.cs index e85ee9ea5118..2f83951b2dcf 100644 --- a/src/Controls/src/Core/Handlers/Items/iOS/SelectableItemsViewController.cs +++ b/src/Controls/src/Core/Handlers/Items/iOS/SelectableItemsViewController.cs @@ -69,7 +69,7 @@ internal void ClearSelection() { return; } - + var selectedItemIndexes = CollectionView.GetIndexPathsForSelectedItems(); foreach (var index in selectedItemIndexes) diff --git a/src/Controls/tests/TestCases.HostApp/Issues/Issue29882.xaml.cs b/src/Controls/tests/TestCases.HostApp/Issues/Issue29882.xaml.cs index e693a633f5d5..cebfb2e73eb9 100644 --- a/src/Controls/tests/TestCases.HostApp/Issues/Issue29882.xaml.cs +++ b/src/Controls/tests/TestCases.HostApp/Issues/Issue29882.xaml.cs @@ -2,7 +2,7 @@ namespace Maui.Controls.Sample.Issues; -[Issue(IssueTracker.Github, 29882, "[iOS] Crash occurs when ItemsSource is set to null in the SelectionChanged handler",PlatformAffected.iOS)] +[Issue(IssueTracker.Github, 29882, "[iOS] Crash occurs when ItemsSource is set to null in the SelectionChanged handler", PlatformAffected.iOS)] public partial class Issue29882 : ContentPage { private ObservableCollection items; diff --git a/src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue29882.cs b/src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue29882.cs index a9803633e2ac..1b0d387590c9 100644 --- a/src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue29882.cs +++ b/src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue29882.cs @@ -7,18 +7,18 @@ namespace Microsoft.Maui.TestCases.Tests.Issues; public class Issue29882 : _IssuesUITest { - public Issue29882(TestDevice device) : base(device) - { - } + public Issue29882(TestDevice device) : base(device) + { + } - public override string Issue => "[iOS] Crash occurs when ItemsSource is set to null in the SelectionChanged handler"; + public override string Issue => "[iOS] Crash occurs when ItemsSource is set to null in the SelectionChanged handler"; - [Test] - [Category(UITestCategories.CollectionView)] - public void SettingItemSourceToNullShouldNotCrash() - { - App.WaitForElement("Item1"); - App.Tap("Item1"); - App.WaitForElement("MauiLabel"); // If app doesn't crash, test passes. + [Test] + [Category(UITestCategories.CollectionView)] + public void SettingItemSourceToNullShouldNotCrash() + { + App.WaitForElement("Item1"); + App.Tap("Item1"); + App.WaitForElement("MauiLabel"); // If app doesn't crash, test passes. } }