Skip to content

Conversation

@jgonet
Copy link
Member

@jgonet jgonet commented Feb 12, 2021

Description

Fixes #1354.

We didn't rename all instances of _handlerTag to handlerTag. That caused waitFor tag resolution to fail and this prop was ignored.

Test code

import React, {useRef} from 'react';
import {StyleSheet, View, ScrollView, Text} from 'react-native';
import {
  NativeViewGestureHandler,
  PanGestureHandler,
} from 'react-native-gesture-handler';

const App = () => {
  const panRef = useRef<PanGestureHandler>(null);
  return (
    <View style={styles.container}>
      <PanGestureHandler ref={panRef}>
        <NativeViewGestureHandler waitFor={panRef}>
          <ScrollView style={styles.container}>
            {Array(50)
              .fill(0)
              .map((_, index) => (
                <Text
                  key={`item-${index}`}
                  style={styles.item}>{`item-${index}`}</Text>
              ))}
          </ScrollView>
        </NativeViewGestureHandler>
      </PanGestureHandler>
    </View>
  );
};

const styles = StyleSheet.create({
  container: {
    flex: 1,
  },
  item: {
    padding: 6,
    margin: 3,
    backgroundColor: '#999',
  },
});
export default App;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[1.10.0] waitFor is broken

2 participants