callstack / callstack/react-native-paper

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

オープン
#4,873 コメント 2 件 リアクション 0 件 担当者 0 名 GitHub で見る
bug
主要言語
TypeScript
スター
14.5k
フォーク
2.2k
平均マージ
5日 23時間
マージ済み PR(30日)
12

説明

### 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

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。