roubachof / Sharpnado.CollectionView

A performant list view supporting: grid, horizontal and vertical layout, drag and drop, and reveal animations.
The Unlicense
244 stars 30 forks source link

Incorrect animation behaviour. #101

Open Petrarca181 opened 1 year ago

Petrarca181 commented 1 year ago

Platform (please complete the following information):

My collection


  <sho:CollectionView
      Grid.Row="0"
      x:Name="CollectionView"
      CollectionLayout="Vertical"
      ItemHeight="60"
      ItemTemplate="{StaticResource ComponentiSquadraTemplate}"
      ItemsSource="{x:Bind Path=Loader.Result, IsItemsSource=True}"/>

<DataTemplate x:Key="ComponentiSquadraTemplate" x:DataType="models:ComponentiSquadraModel">
      <sho:DraggableViewCell IsDraggable="False">
          <SwipeView HeightRequest="70">
              <SwipeView.RightItems>
                  <SwipeItems Mode="Execute">
                      <SwipeItem Command="{Binding Source={RelativeSource AncestorType={x:Type sho:CollectionView}}, Path=BindingContext.SwipeItemInvokedCommand}" CommandParameter="{Binding .}" />
                  </SwipeItems>
              </SwipeView.RightItems>
                 <Grid HeightRequest="60">
                  // some entries hereù
                 </Grid>
             </SwipeView>
      </sho:DraggableViewCell>
  </DataTemplate>

Appearing animations wokrs fine untill I remove some items from collection. When cell is swiped to the right it will be removed form the collection in the viewModel.
If I remove 3 items and than add 3 new items they will not have appearing animation, from the forth new item animation will be displayed. Basically number of removed items = number of times animation will not be displayed.

https://github.com/roubachof/Sharpnado.CollectionView/assets/54235138/1796edb7-90be-46f8-ac48-f605b9ed244e