callstack / callstack/react-native-paper

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

Ouverte
#4,873 2 commentaires 0 réactions 0 personnes assignées Voir sur GitHub
bug
Langage dominant
TypeScript
Étoiles
14.5k
Forks
2.2k
Merge moyen
5 j 23 h
PR mergées (30 j)
12

Description

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

Guide de contribution

Ouvrir le guide de contribution

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.