react-native-swipe-item
react-native-swipe-item copied to clipboard
Close not work for me
hi , thanks for your job.
when i use that close not work for me .
it work when i console.log(this.swipeItemRef.close) Function close
but the swiper item not close for me .
it's a TS react-native project. code like this.
swipeItemRef: SwipeItem | null | undefined;
<SwipeProvider mode="single" closeTrigger="onButtonShowed" > <SwipeItem ref={(item) => this.swipeItemRef = item} style={{flex:1}} key={index} rightButtons={this.rightButton(item)} disableSwipeIfNoButton={true} > <Item ... /> </SwipeItem> </SwipeProvider>
close () : this.swipeItemRef && this.swipeItemRef.close();