DataGrid custom filter close window after clear or apply

The filter clear and apply works but the filter window stays open, i have to click outside the window to close it.

<RadzenDataGridColumn FilterValue=_instaSellTimeFilterValue Property=InstaSellTime Title="Latest Insta Sell" Width="70px" MinWidth="70px"
                      FilterOperator=@(_instaSellTimeFilterDirection == TimeDirection.Before ? FilterOperator.LessThanOrEquals : FilterOperator.GreaterThanOrEquals)>
    <Template Context=item>
        <RadzenText Style=@($"color: {CSSHelper.GetColor(nameof(item.InstaSellTime), item.InstaSellTime)}")
                    Text=@($"{NumericUtility.FormatSeconds(item.InstaSellTime)} ago") />
    </Template>
    <FilterTemplate>
        <CustomTimeFilterTemplate @bind-FilterValue=_instaSellTimeFilterValue @bind-TimeDirection=_instaSellTimeFilterDirection
                                  @bind-TimeNumber=_instaSellTimeFilterNumber @bind-TimeUnit=_instaSellTimeFilterUnit />
    </FilterTemplate>
</RadzenDataGridColumn>
<div class="grid gap-2 m-[10px] w-[200px]">
    <RadzenText Style="font-size: 14px;font-weight: 600; margin-top: 5px;" Text="Filter" />
    <RadzenDropDown @bind-Value=TimeDirection
                    Data=@(Enum.GetValues(typeof(TimeDirection)).Cast<TimeDirection>().Select(timeDirection => timeDirection)) />

    <div class="flex gap-6 justify-around">
        <RadzenNumeric Min="1" @bind-Value=TimeNumber ShowUpDown=true />
        <RadzenDropDown @bind-Value=TimeUnit
                        Data=@(Enum.GetValues(typeof(TimeUnit)).Cast<TimeUnit>().Select(timeUnit => timeUnit)) />
    </div>

    <div class="flex gap-[85px] justify-around mt-[14px]">
        <RadzenButton Style="background-color: #3b9fd5;" Text=Clear Click=ClearFilter />
        <RadzenButton Text=Apply Click=ApplyFilter />
    </div>
</div>

@code {
    [Parameter]
    public long? FilterValue { get; set; }
    [Parameter]
    public EventCallback<long?> FilterValueChanged { get; set; }

    [Parameter]
    public TimeDirection TimeDirection { get; set; }
    [Parameter]
    public EventCallback<TimeDirection> TimeDirectionChanged { get; set; }

    [Parameter]
    public long? TimeNumber { get; set; }
    [Parameter]
    public EventCallback<long?> TimeNumberChanged { get; set; }

    [Parameter]
    public TimeUnit TimeUnit { get; set; }
    [Parameter]
    public EventCallback<TimeUnit> TimeUnitChanged { get; set; }

    private void ClearFilter()
    {
        TimeDirection = TimeDirection.Before;
        TimeNumber = null;
        TimeUnit = TimeUnit.Hours;
        UpdateFilterValues();
    }

    private void ApplyFilter() => UpdateFilterValues();

    private void UpdateFilterValues()
    {
        FilterValueChanged.InvokeAsync(TimeNumber * (int)TimeUnit);
        TimeDirectionChanged.InvokeAsync(TimeDirection);
        TimeNumberChanged.InvokeAsync(TimeNumber);
        TimeUnitChanged.InvokeAsync(TimeUnit);
    }
}

You can try await JSRuntime.InvokeVoidAsync("Radzen.closeAllPopups"). You might need to use async Task for your methods instead void.