Skip to content

Commit

Permalink
Fix to ensure actions dropdown closes when transitioning to share route
Browse files Browse the repository at this point in the history
  • Loading branch information
JYLN committed Nov 8, 2023
1 parent d599404 commit 02e4caa
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/lib/components/ui/TimeTableActions.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,12 @@
export let elapsed_time: number;
export let deleteTimeForm: SuperValidated<DeleteTimeEntrySchema> | undefined = undefined;
let actionsOpen = false;
let noteDialogOpen = false;
let deleteDialogOpen = false;
</script>

<DropdownMenu.Root positioning={{ placement: 'bottom-end' }}>
<DropdownMenu.Root positioning={{ placement: 'bottom-end' }} bind:open={actionsOpen}>
<DropdownMenu.Trigger asChild let:builder>
<Button variant="ghost" builders={[builder]} size="icon" class="relative h-8 w-8 p-0">
<MoreHorizontal class="h-4 w-4" />
Expand All @@ -43,7 +44,7 @@
<Pencil class="mr-2 h-4 w-4" />
Edit time entry
</DropdownMenu.Item>
<DropdownMenu.Item href="/previous/{id}/share">
<DropdownMenu.Item on:click={() => (actionsOpen = false)} href="/previous/{id}/share">
<Share class="mr-2 h-4 w-4" />
Share time entry
</DropdownMenu.Item>
Expand Down

0 comments on commit 02e4caa

Please sign in to comment.