react-native-swipeout icon indicating copy to clipboard operation
react-native-swipeout copied to clipboard

Elements with onPress capture swipe events

Open rollsroyc3 opened this issue 6 years ago • 5 comments

I am currently using a FlatList and am having issues with touch events. I saw the ticket here and have been testing myself over the last few hours. The issue seems to arise from setting the sensitivity value to high. Just wanted to post this in case anyone else has issues in the future.

rollsroyc3 avatar Aug 29 '18 21:08 rollsroyc3

Bump. This is an issue. Swipeout will swipe when TouchableWithoutFeedback is commented out but will not swipe if it is not commented out

 <Swipeout
        // autoClose={true}
        sensitivity={40}
        style={{ backgroundColor: "white" }}
        right={swipeoutBtns}
      >
        <TouchableWithoutFeedback onPress={() => this.selectResult(index)}>
        <View>
          <Results result={item} />
        </View>
        </TouchableWithoutFeedback>
      </Swipeout>

mikeKane avatar Jun 12 '19 18:06 mikeKane

@mikeKane Have you tried removing the sensitivity property?

rollsroyc3 avatar Jun 12 '19 19:06 rollsroyc3

Yes. Is it working for you now?

<Swipeout
        autoClose={true}
        onOpen={(sectionID, rowID) => {
          this.setState({
            sectionID,
            rowID
          });
          close = true;
        }}
        onClose={() => console.log("===close")}
        scroll={event => (close = false)}
        style={{ backgroundColor: "white" }}
        right={swipeoutBtns}
      >
        <TouchableWithoutFeedback onPress={() => this.selectResult(index)}>
          <View>
            <Results result={item} />
          </View>
        </TouchableWithoutFeedback>
      </Swipeout>

That is my latest code.

mikeKane avatar Jun 12 '19 19:06 mikeKane

Yeah removing sensitivity fixed my issue.

rollsroyc3 avatar Jun 12 '19 19:06 rollsroyc3

This issue wasn't solved for me by removing sensitivity. Are we able to reopen this?

mikeKane avatar Jun 12 '19 19:06 mikeKane