我正在使用来自本机的SwipeRow,一切都很好,但是当我在移动设备上运行该应用程序时,显示typeError“ TypeError:undefined is an object(evaluating'this_panResponder.panHandlers”。),我找不到该错误。任何人都想帮助解决此问题。在此先感谢
这是SwipeRow类
class CartItem extends Component {
constructor(props) {
super(props);
this.state = {};
}
render() {
return (
<View>
<SwipeRow
leftOpenValue={75}
rightOpenValue={-75}
left={
<Button success onPress={() => alert("Add")}>
<Icon active name="add" />
</Button>
}
body={
<View>
<Text>SwipeRow Body Text</Text>
</View>
}
right={
<Button danger onPress={() => alert("Trash")}>
<Icon active name="trash" />
</Button>
}
/>
</View>
);
}
}
export default CartItem;
这是我渲染CartItem的类
class Cart extends Component {
constructor(props) {
super(props);
this.state = {};
}
render() {
return (
<View>
<HeaderContainer navigation={this.props.navigation} />
<View style={styles.parentView}>
<Content>
<CartItem title={"Burger"} />
<CartItem title={"PiZZA"} />
<CartItem title={"COFFEE"} />
<CartItem title={"BREAD"} />
</Content>
<View style={styles.footerContainer}>
<Text style={styles.totalPriceStyle}>Total:</Text>
</View>
</View>
</View>
);
}
}
export default Cart;