c-villain / SwipeActions

Swipe actions for any view, swipe menu based on SwiftUI, full swiping and RTL languages supporting, iOS 13+, add your own views to swipes
https://t.me/swiftui_dev
MIT License
234 stars 27 forks source link

Automatic closing does not work with LazyVStack items that are offscreen #21

Closed gomigbg closed 5 months ago

gomigbg commented 10 months ago

Using the state parameter as described in the documentation, we can automatically close swiped items when a new item is swiped, however, this doesn't work in a LazyVStack.

To repro:

  1. embed a LazyVStack in a ScrollView.
  2. Then add enough items to the LazyVStack so that it overflows the screen.
  3. Scroll to the bottom item and open it's swipe menu.
  4. Scroll the bottom item off the screen and swipe a new item
  5. Scroll to the bottom item and notice that its swipe menu is still open (so now there are two items with swipe menus open)
c-villain commented 10 months ago

@gomigbg thx for your report👍🏻 what's iOS version for the repro?:)

gomigbg commented 10 months ago

I've reproduced this on iOS 17

c-villain commented 9 months ago

@gomigbg yeap, confirmed, thx for reporting!

gomigbg commented 9 months ago

@c-villain Great, thanks for having a look at it!

c-villain commented 5 months ago

fix in 0.3.4