Skip to content

Form submission within dropdown menu does not work #1406

Answered by SavvasMohito
SavvasMohito asked this question in Help
Discussion options

You must be logged in to vote

Thanks for the response. This is what I did as a workaround:

<script lang="ts">
	let form: HTMLFormElement | undefined = $state(undefined);
</script>

<DropdownMenu.Root>
	<DropdownMenu.Trigger>
		<Button variant="ghost" class="relative flex h-10 w-10 items-center rounded-full">
			<Avatar.Root class="h-10 w-10">
				<Avatar.Image src={user && user.user_metadata.picture ? user.user_metadata.picture : "default-avatar.jpg"} alt="user image" />
				<Avatar.Fallback>SC</Avatar.Fallback>
			</Avatar.Root>
		</Button>
	</DropdownMenu.Trigger>
	<DropdownMenu.Content class="w-56" align="end">
		{#if user}
			<DropdownMenu.Label class="font-normal">
				<div class="flex flex-col space-y-1">
					<p 

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@SavvasMohito
Comment options

Answer selected by SavvasMohito
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
2 participants