-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
[iOS] - Swipeview with collectionview issue #19541
Comments
We've added this issue to our backlog, and we will work to address it as time and resources allow. If you have any additional information or questions about this issue, please leave a comment. For additional info about issue management, please read our Triage Process. |
It looks like its related to the way CollectionView virtualization works. As alternative try with a ListView, or set the DataTemplate in a separate View with its BindingContext. |
Hi @SupermindPT, thank you for your reply. <ListView ItemsSource="{Binding MyList}" >
<ListView.ItemTemplate>
<DataTemplate>
<ViewCell>
<SwipeView>
<Label Text="{Binding Name}" />
<SwipeView.RightItems>
<SwipeItems SwipeBehaviorOnInvoked="Close">
<SwipeItemView>
<Button BackgroundColor="Pink" Text="Delete" />
</SwipeItemView>
</SwipeItems>
</SwipeView.RightItems>
</SwipeView>
</ViewCell>
</DataTemplate>
</ListView.ItemTemplate>
</ListView> Then I have tried the CollectionView wth a data template in a separate view: <CollectionView ItemsSource="{Binding MyList}" >
<CollectionView.ItemTemplate>
<DataTemplate>
<local:ItemTemplate BindingContext="{Binding .}"/>
</DataTemplate>
</CollectionView.ItemTemplate>
</CollectionView> ItemTemplate.xaml: <?xml version="1.0" encoding="utf-8" ?>
<ContentView
xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="MauiApp6.ItemTemplate">
<SwipeView HeightRequest="60">
<Label Text="{Binding Name}" />
<SwipeView.RightItems>
<SwipeItems SwipeBehaviorOnInvoked="Close">
<SwipeItemView>
<Button BackgroundColor="Pink" Text="Delete" />
</SwipeItemView>
</SwipeItems>
</SwipeView.RightItems>
</SwipeView>
</ContentView> but the issue still persist. |
Description
Hi,
in a Collectionview if there is a swipeview opened and the list binded at the collectionview is refreshed, the swipe is not resetted.
On android works.
ios:
android:
Steps to Reproduce
Link to public reproduction project repository
https://github.com/MattePozzy/MauiSwipeViewIssue
Version with bug
8.0.3
Is this a regression from previous behavior?
Not sure, did not test other versions
Last version that worked well
Unknown/Other
Affected platforms
iOS
Affected platform versions
No response
Did you find any workaround?
No
Relevant log output
No response
The text was updated successfully, but these errors were encountered: