Skip to content

Commit

Permalink
Fixed DataGrid advanced numeric filter second input Issue
Browse files Browse the repository at this point in the history
Fix #1824
  • Loading branch information
enchev committed Dec 1, 2024
1 parent 4da4e53 commit fbc1dbb
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Radzen.Blazor/RadzenDataGridHeaderCell.razor
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@
{
<div class="rz-grid-filter-buttons">
<RadzenButton ButtonStyle="ButtonStyle.Base" class="rz-clear-filter" Click="@ClearFilter" Text=@Grid.ClearFilterText title="@Grid.ClearFilterText" />
<RadzenButton ButtonStyle="ButtonStyle.Primary" class="rz-apply-filter" form="@($"{getColumnPopupID()}-form")" ButtonType="ButtonType.Submit" Text=@Grid.ApplyFilterText title="@Grid.ApplyFilterText" />
<RadzenButton onmousedown="this.focus()" ButtonStyle="ButtonStyle.Primary" class="rz-apply-filter" form="@($"{getColumnPopupID()}-form")" ButtonType="ButtonType.Submit" Text=@Grid.ApplyFilterText title="@Grid.ApplyFilterText" />
</div>
}
</Popup>
Expand Down Expand Up @@ -345,7 +345,7 @@ else
if (Column.FilterValueTemplate == null)
{
var firstInputValue = await Grid.GetJSRuntime().InvokeAsync<string>("Radzen.getNumericValue", Grid.getFilterInputId(Column) + "f");
if (!object.Equals($"{Column.GetFilterValue()}", firstInputValue))
if (!object.Equals($"{Column.GetFilterValue()}", $"{firstInputValue}"))
{
Column.SetFilterValue(!string.IsNullOrEmpty(firstInputValue) ? Convert.ChangeType(firstInputValue, Column.FilterPropertyType) : null);
}
Expand All @@ -354,7 +354,7 @@ else
if (Column.SecondFilterValueTemplate == null)
{
var secondInputValue = await Grid.GetJSRuntime().InvokeAsync<string>("Radzen.getNumericValue", Grid.getFilterInputId(Column) + "s");
if (!object.Equals($"{Column.GetSecondFilterValue()}", secondInputValue))
if (!object.Equals($"{Column.GetSecondFilterValue()}", $"{secondInputValue}"))
{
Column.SetFilterValue(!string.IsNullOrEmpty(secondInputValue) ? Convert.ChangeType(secondInputValue, Column.FilterPropertyType) : null, false);
}
Expand Down

0 comments on commit fbc1dbb

Please sign in to comment.