From cb7ba040ec9fff46380621f64eb19733c9b46963 Mon Sep 17 00:00:00 2001 From: Erin McLaughlin Date: Sat, 18 May 2024 15:21:46 -0400 Subject: [PATCH] some cleanup --- .../Examples/Dropdown/SimpleDropdownExample.razor | 6 +++--- .../Behaviors/HBOutsideClickBehavior.razor | 4 ++-- src/HeadlessBlazor.Dropdown/HBDropdown.cs | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/HeadlessBlazor.Docs.Client/Examples/Dropdown/SimpleDropdownExample.razor b/docs/HeadlessBlazor.Docs.Client/Examples/Dropdown/SimpleDropdownExample.razor index 7a904c1..5fc9486 100644 --- a/docs/HeadlessBlazor.Docs.Client/Examples/Dropdown/SimpleDropdownExample.razor +++ b/docs/HeadlessBlazor.Docs.Client/Examples/Dropdown/SimpleDropdownExample.razor @@ -6,8 +6,8 @@ Disabled Button Button (Stop Propagation) Link - Link (Prevent Default) - Link (Stop Propagation) - Link (Prevent Default and Stop Propagation) + Link (Prevent Default) + Link (Stop Propagation) + Link (Prevent Default and Stop Propagation) diff --git a/src/HeadlessBlazor.Core/Behaviors/HBOutsideClickBehavior.razor b/src/HeadlessBlazor.Core/Behaviors/HBOutsideClickBehavior.razor index e9e3c1f..c73dfad 100644 --- a/src/HeadlessBlazor.Core/Behaviors/HBOutsideClickBehavior.razor +++ b/src/HeadlessBlazor.Core/Behaviors/HBOutsideClickBehavior.razor @@ -8,7 +8,7 @@ private IJSRuntime JS { get; set; } = default!; [Parameter] - public IReferenceable Referenceable { get; set; } = default!; + public IReferenceable Container { get; set; } = default!; [Parameter] public EventCallback OnClick { get; set; } @@ -40,7 +40,7 @@ if (firstRender) { var module = await JS.InvokeAsync("import", "./_content/HeadlessBlazor.Core/Behaviors/HBOutsideClickBehavior.razor.js"); - jsObjRef = await module.InvokeAsync("OutsideClickBehavior.createInstance", Referenceable.ElementReference, objRef); + jsObjRef = await module.InvokeAsync("OutsideClickBehavior.createInstance", Container.ElementReference, objRef); await module.DisposeAsync(); } } diff --git a/src/HeadlessBlazor.Dropdown/HBDropdown.cs b/src/HeadlessBlazor.Dropdown/HBDropdown.cs index 6d6c063..b757e80 100644 --- a/src/HeadlessBlazor.Dropdown/HBDropdown.cs +++ b/src/HeadlessBlazor.Dropdown/HBDropdown.cs @@ -45,7 +45,7 @@ protected override void BuildRenderTree(RenderTreeBuilder builder) { b.OpenComponent(seq++); b.AddAttribute(seq++, nameof(HBOutsideClickBehavior.OnClick), new EventCallback(this, CloseAsync)); - b.AddAttribute(seq++, nameof(HBOutsideClickBehavior.Referenceable), this); + b.AddAttribute(seq++, nameof(HBOutsideClickBehavior.Container), this); b.CloseComponent(); }