Skip to content

Commit

Permalink
fix fab closing on native
Browse files Browse the repository at this point in the history
  • Loading branch information
taronaleksanian committed Jan 8, 2025
1 parent 6193888 commit 5c27c5f
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions packages/app/components/Fab/FabNative.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,14 @@ const FABNative: React.FC<FABProps> = ({
const { currentTheme } = useTheme();

return (
<Popover>
<Popover
open={showQuickActions}
onOpenChange={(open) => {
if (!open) {
closeQuickActions();
}
}}
>
<Popover.Trigger asChild>
<RButton
style={{
Expand All @@ -37,6 +44,7 @@ const FABNative: React.FC<FABProps> = ({
bottom: 20,
alignSelf: 'center',
}}
onPress={toggleQuickActions}
>
<MaterialIcons
name="add"
Expand All @@ -63,7 +71,10 @@ const FABNative: React.FC<FABProps> = ({
{quickActionData.map((action) => (
<QuickActionButton
key={action.action}
onPress={() => handleActionSelect(action.action)}
onPress={() => {
handleActionSelect(action.action);
closeQuickActions();
}}
iconName={action.iconName}
text={action.text}
/>
Expand Down

0 comments on commit 5c27c5f

Please sign in to comment.