marekrozmus / react-swipeable-list

Swipeable list component for React supporting several behaviours (e.g. iOS)
https://marekrozmus.github.io/react-swipeable-list/
MIT License
114 stars 20 forks source link

Action Icon not persisting #14

Closed tuggernuts closed 3 years ago

tuggernuts commented 3 years ago

Hi, I have your component installed and mostly working. Thank you for making available.

Something I can't figure out: How do you make the action content persist on the screen? I can swipe, and see the action content come into view, but it does not stay in view like in samples. It just slides back out of view when released.

What am I doing wrong? My code is very similar to your usage example in the Readme. Very simple, just text.

Thanks..

marekrozmus commented 3 years ago

Hi :)

Did you set up list type to IOS like here: https://github.com/marekrozmus/react-swipeable-list/blob/cae18105059baee8e9038889d8a3e48703294767/examples/src/ios/WithOneAction.js#L95

If that does not work send me a link to your repository I'll check :)

tuggernuts commented 3 years ago

Yes, I did have that enum set.

Here is a really simple example that closely mimics your usage guide: https://github.com/tuggernuts/react-swipe. I just set up this repo with pertinent files.

I'm guessing there is something required that I'm not doing. Thanks!

marekrozmus commented 3 years ago

you've got: <SwipeableList fullSwipe={false} ListType={ListType.IOS}>

and it should be:

<SwipeableList fullSwipe={false} type={ListType.IOS}>

tuggernuts commented 3 years ago

Ugh, I knew it was something simple. Thanks.

marekrozmus commented 3 years ago

You're welcome. Hope you will build something awesome with this list :)