RadzenDataFilter Numeric Input Issue #1501

Closed
opened 2026-01-29 17:54:33 +00:00 by claunia · 2 comments
Owner

Originally created by @kerajel on GitHub (Nov 28, 2024).

RadzenDataFilter numeric input suffers the same issues as RadzenDataGrid's AdvancedFilter on numeric columns as described in https://github.com/radzenhq/radzen-blazor/issues/1809 (that is, the issue is reproduced only on the hosted environments, influenced by Blazor server lag)

To reproduce

Negative case
Define a RadzenDataFilter with numeric column
Input a value and filter right away

Expected result
Input value is registered in the RadzenDataFilter<>.ToFilterString();

Actual result
Input value is NOT registered in the RadzenDataFilter<>.ToFilterString();

Positive case
Define a RadzenDataFilter with numeric column
Input a value and DO NOT filter right away
Focus something on the page
Do filter

Expected result = Actual Result
Input value is registered in the RadzenDataFilter<>.ToFilterString();

Originally created by @kerajel on GitHub (Nov 28, 2024). RadzenDataFilter numeric input suffers the same issues as RadzenDataGrid's AdvancedFilter on numeric columns as described in https://github.com/radzenhq/radzen-blazor/issues/1809 (that is, the issue is reproduced only on the hosted environments, influenced by Blazor server lag) **To reproduce** Negative case Define a RadzenDataFilter with numeric column Input a value and filter right away **Expected result** Input value is registered in the RadzenDataFilter<>.ToFilterString(); **Actual result** Input value is NOT registered in the RadzenDataFilter<>.ToFilterString(); Positive case Define a RadzenDataFilter with numeric column Input a value and DO NOT filter right away Focus something on the page Do filter **Expected result** = **Actual Result** Input value is registered in the RadzenDataFilter<>.ToFilterString();
Author
Owner

@kerajel commented on GitHub (Dec 6, 2024):

The following script helped to resolve the issue:

function forceUpdateNumericInputs() {
    document.querySelectorAll('.rz-numeric-input input').forEach(input => {
        input.blur();
        input.focus();
    });
}
async Task Submit() // whatever action that leads to reading RadzenDataFilter<>.ToFilterString();
{
    await JSRuntime.InvokeVoidAsync("forceUpdateNumericInputs");
    string filterString = @dataFilter.RadzenDataFilter<>.ToFilterString(); // returns current input
}
@kerajel commented on GitHub (Dec 6, 2024): The following script helped to resolve the issue: ```js function forceUpdateNumericInputs() { document.querySelectorAll('.rz-numeric-input input').forEach(input => { input.blur(); input.focus(); }); } ``` ```c# async Task Submit() // whatever action that leads to reading RadzenDataFilter<>.ToFilterString(); { await JSRuntime.InvokeVoidAsync("forceUpdateNumericInputs"); string filterString = @dataFilter.RadzenDataFilter<>.ToFilterString(); // returns current input } ```
Author
Owner

@enchev commented on GitHub (Dec 11, 2024):

Fixed in a0cfc5d267

@enchev commented on GitHub (Dec 11, 2024): Fixed in https://github.com/radzenhq/radzen-blazor/commit/a0cfc5d26736c5d7f7397356818ceef6059ba152
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/radzen-blazor#1501