-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Closed
Description
Current behaviour
Every time when refresh page include this component in h5, it throw some exception.
Expected behaviour
show without exception.
How to reproduce?
https://callstack.github.io/react-native-paper/docs/components/FAB/FABGroup
import * as React from 'react';
import { FAB, Portal, PaperProvider } from 'react-native-paper';
const FabGroup = () => {
const [state, setState] = React.useState({ open: false });
const onStateChange = ({ open }) => setState({ open });
const { open } = state;
return (
<Portal>
<FAB.Group
open={open}
visible
icon={open ? 'calendar-today' : 'plus'}
actions={[
{ icon: 'plus', onPress: () => console.log('Pressed add') },
{
icon: 'star',
label: 'Star',
onPress: () => console.log('Pressed star'),
},
{
icon: 'email',
label: 'Email',
onPress: () => console.log('Pressed email'),
},
{
icon: 'bell',
label: 'Remind',
onPress: () => console.log('Pressed notifications'),
},
]}
onStateChange={onStateChange}
onPress={() => {
if (open) {
// do something if the speed dial is open
}
}}
/>
</Portal>
);
};
export default FabGroup;
Preview
What have you tried so far?
Your Environment
software | version |
---|---|
ios | x |
android | x |
react-native | 0.74.5 |
react-native-paper | ^5.12.5 |
node | 21.1.0 |
npm or yarn | 1.22.22 |
expo sdk | ~51.0.28 |