Skip to content

Commit

Permalink
Merge pull request #1412 from andrew-bierman/fix/fab
Browse files Browse the repository at this point in the history
fix fab closing on native
  • Loading branch information
taronaleksanian authored Jan 9, 2025
2 parents b072498 + 5c27c5f commit 8f1a712
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 8f1a712

Please sign in to comment.