callstack / callstack/react-native-paper

Native implementation of TouchableRipple doesn't support children and style as functions

Đang mở
#4,873 2 bình luận 0 reaction 0 người được giao Xem trên GitHub
bug
Ngôn ngữ chính
TypeScript
Star
14.5k
Fork
2.2k
Merge trung bình
5 ngày 23 giờ
Pull request đã merge (30 ngày)
12

Mô tả

### Current behaviour
Native version of `TouchableRipple` doesn't support `children` and `style` props as functions.
It fails with an exception: "React.Children.only expected to receive a single React element child."

But the web version supports both.
And [documentation](https://oss.callstack.com/react-native-paper/docs/components/TouchableRipple/#children-required) says it should support it.

It seems the split in behaviour between native and web happened after this PR: https://github.com/callstack/react-native-paper/pull/3909

### Expected behaviour
It should behave the same as the web version and as described in the documentation.

### How to reproduce?
https://snack.expo.dev/@rosko/touchableripple-children-style

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.