diff --git a/Radzen.Blazor/RadzenDataFilter.razor b/Radzen.Blazor/RadzenDataFilter.razor
index ae03f5d97d4..6aaa407462c 100644
--- a/Radzen.Blazor/RadzenDataFilter.razor
+++ b/Radzen.Blazor/RadzenDataFilter.razor
@@ -12,7 +12,7 @@
@if (Visible)
{
-
+
diff --git a/Radzen.Blazor/RadzenDataFilter.razor.cs b/Radzen.Blazor/RadzenDataFilter.razor.cs
index de8227ab403..80828874031 100644
--- a/Radzen.Blazor/RadzenDataFilter.razor.cs
+++ b/Radzen.Blazor/RadzenDataFilter.razor.cs
@@ -1,5 +1,5 @@
using Microsoft.AspNetCore.Components;
-using System;
+using Microsoft.JSInterop;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
@@ -423,5 +423,19 @@ public async Task RemoveFilter(CompositeFilterDescriptor filter)
await Filter();
}
}
+
+ private async Task OnFilterOperatorChanged(LogicalFilterOperator _)
+ {
+ var inputValues = await JSRuntime.InvokeAsync>("Radzen.getNumericInputValues");
+
+ await InvokeAsync(ChangeState);
+
+ await JSRuntime.InvokeVoidAsync("Radzen.setNumericInputValues", inputValues);
+
+ if (Auto)
+ {
+ await InvokeAsync(Filter);
+ }
+ }
}
-}
+}
\ No newline at end of file
diff --git a/Radzen.Blazor/wwwroot/Radzen.Blazor.js b/Radzen.Blazor/wwwroot/Radzen.Blazor.js
index 6146ecce307..12501118658 100644
--- a/Radzen.Blazor/wwwroot/Radzen.Blazor.js
+++ b/Radzen.Blazor/wwwroot/Radzen.Blazor.js
@@ -1630,6 +1630,37 @@ window.Radzen = {
el.dispatchEvent(new KeyboardEvent('keydown', { bubbles: true, cancelable: true, keyCode: 9 }));
}
},
+ blurAllNumericInputs: function () {
+ const inputs = document.querySelectorAll('.rz-numeric-input input');
+ inputs.forEach(input => {
+ input.blur();
+ input.focus();
+ });
+ },
+ getNumericInputValues: function () {
+ const inputs = {};
+ const spans = document.querySelectorAll('span.rz-numeric');
+ spans.forEach((span) => {
+ const input = span.querySelector('.rz-numeric-input');
+ if (input && span.id) {
+ inputs[span.id] = input.value;
+ }
+ });
+ return inputs;
+ },
+ setNumericInputValues: function (values) {
+ for (const spanId in values) {
+ if (values.hasOwnProperty(spanId)) {
+ const span = document.getElementById(spanId);
+ if (span) {
+ const input = span.querySelector('.rz-numeric-input');
+ if (input) {
+ input.value = values[spanId];
+ }
+ }
+ }
+ }
+ },
readFileAsBase64: function (fileInput, maxFileSize, maxWidth, maxHeight) {
var calculateWidthAndHeight = function (img) {
var width = img.width;
@@ -2496,4 +2527,4 @@ window.Radzen = {
tooltipContent.classList.remove('rz-bottom-chart-tooltip');
tooltipContent.classList.add(tooltipContentClassName);
}
-};
+};
\ No newline at end of file