-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Closed
Description
Current behaviour
Badge in Drawer.CollapsedItem throws Text strings must be rendered within a <Text> component but only when I input a zero.
For all other numbers it works.
How to reproduce?
<Drawer.CollapsedItem
onPress={() => {}}
focusedIcon="account-group"
badge={0}
unfocusedIcon="account-group-outline"
label="Group"
/>
I ran this in expo dev client on a real device if it matters.
What have you tried so far?
I know how to handle this, just not set badge if count is zero. But maybe you want to handle it in code.
Your Environment
| software | version |
|---|---|
| ios | x |
| android | x |
| react-native | x.x.x |
| react-native-paper | 5.12.5 |
| node | x.x.x |
| npm or yarn | x.x.x |
| expo sdk | 51.0.31 |