Skip to content

Commit fb53ead

Browse files
CopilotShewart
andcommitted
Add @OnClick:stopPropagation to DrawerContent and SheetContent compositional templates
Co-authored-by: Shewart <105489800+Shewart@users.noreply.github.com>
1 parent 7996453 commit fb53ead

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/ShellUI.Templates/Templates/DrawerContentTemplate.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ @using YourProjectNamespace.Components.UI.Variants
2222
@if (Parent?.Open == true)
2323
{
2424
<div class=""fixed inset-0 z-50 bg-black/80 animate-in fade-in-0"" @onclick=""Close""></div>
25-
<div class=""@DrawerVariants.Get(Parent.Side, Class)"" @attributes=""AdditionalAttributes"">
25+
<div class=""@DrawerVariants.Get(Parent.Side, Class)"" @onclick:stopPropagation=""true"" @attributes=""AdditionalAttributes"">
2626
<div class=""mx-auto mt-4 h-2 w-[100px] rounded-full bg-muted""></div>
2727
<div class=""flex flex-col gap-4 p-4"">
2828
@ChildContent

src/ShellUI.Templates/Templates/SheetContentTemplate.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ @using YourProjectNamespace.Components.UI.Variants
2222
@if (Parent?.Open == true)
2323
{
2424
<div class=""fixed inset-0 z-50 bg-background/80 backdrop-blur-sm animate-in fade-in-0"" @onclick=""Close""></div>
25-
<div class=""@SheetVariants.Get(Parent.Side, Class)"" @attributes=""AdditionalAttributes"">
25+
<div class=""@SheetVariants.Get(Parent.Side, Class)"" @onclick:stopPropagation=""true"" @attributes=""AdditionalAttributes"">
2626
<div class=""flex flex-col gap-4 p-6"">
2727
@ChildContent
2828
</div>

0 commit comments

Comments
 (0)