-
Notifications
You must be signed in to change notification settings - Fork 102
Description
Description
When using a .NET MAUI CollectionView inside a Syncfusion.Maui.Toolkit.TabView (SfTabView), the SelectionChangedCommand binding does not fire after updating to Syncfusion.Maui.Toolkit v1.0.6. This breaks MVVM selection logic.
XAML:
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui" xmlns:sftab="clr-namespace:Syncfusion.Maui.Toolkit.TabView;assembly=Syncfusion.Maui.Toolkit" xmlns:local="clr-namespace:MinimalRepro" x:Class="MinimalRepro.MainPage" x:DataType="local:MainViewModel"> <sftab:SfTabView> <sftab:SfTabItem Header="Tab"> <sftab:SfTabItem.Content> <CollectionView ItemsSource="{Binding Items}" SelectionChangedCommand="{Binding SelectionChangedCommand}" /> </sftab:SfTabItem.Content> </sftab:SfTabItem> </sftab:SfTabView> </ContentPage>
ViewModel:
public class MainViewModel
{
public ObservableCollection<string> Items { get; } = new() { "A", "B", "C" };
public ICommand SelectionChangedCommand { get; }
public MainViewModel()
{
SelectionChangedCommand = new Command<object>(OnSelectionChanged);
}
private void OnSelectionChanged(object obj)
{
// This is never called in v1.0.6 when inside SfTabView
Debug.WriteLine("SelectionChanged fired");
}
}
Expected:
- SelectionChangedCommand should fire when an item is selected.
Actual:
Command is not called when CollectionView is inside SfTabView.
Steps to Reproduce
- Create a new .NET MAUI app.
- Add Syncfusion.Maui.Toolkit v1.0.6.
- Use the above XAML and ViewModel.
- Run the app and select an item in the CollectionView.
- Observe that SelectionChangedCommand is not called.
Version with bug
1.0.4
Is this a regression from previous behavior?
Yes, this used to work
Last Known Working Version
1.0.3
Affected platforms
iOS
Affected Platform Versions
No response
Have you found a workaround?
No response
Relevant log output
Metadata
Metadata
Assignees
Labels
Type
Projects
Status