Skip to content

Commit

Permalink
HxInputDate - addOpenAndCloseEventListeners - firstRender only
Browse files Browse the repository at this point in the history
  • Loading branch information
hakenr committed Mar 28, 2024
1 parent 5b35806 commit db0a637
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,8 @@ protected override async Task OnAfterRenderAsync(bool firstRender)

await base.OnAfterRenderAsync(firstRender);

if (HasCalendarIcon)
Console.WriteLine("OnAfterRenderAsync");
if (firstRender && HasCalendarIcon)
{
_jsModule ??= await JSRuntime.ImportHavitBlazorBootstrapModuleAsync(nameof(HxInputDate));
await _jsModule.InvokeVoidAsync("addOpenAndCloseEventListeners", _hxDropdownToggleElement.ElementReference, (CalendarIconEffective is not null) ? _iconWrapperElement : null);
Expand Down

0 comments on commit db0a637

Please sign in to comment.