Skip to content

Commit ac482e0

Browse files
authored
feat(StringFilter): support auto filter after input filter text (#6899)
1 parent bbee138 commit ac482e0

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

src/BootstrapBlazor/Components/Filters/StringFilter.razor

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
@if (IsHeaderRow)
55
{
66
<div class="@FilterRowClassString">
7-
<BootstrapInput @bind-Value="@_value1" ShowLabel="false" SkipValidate="true"></BootstrapInput>
7+
<BootstrapInput Value="@_value1" OnValueChanged="OnValueChanged" ShowLabel="false" SkipValidate="true"></BootstrapInput>
88
<FilterButton Items="Items" @bind-Value="_action1" OnSelectedItemChanged="_ => OnFilterAsync()" OnClearFilter="OnClearFilter" />
99
</div>
1010
}

src/BootstrapBlazor/Components/Filters/StringFilter.razor.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,4 +128,10 @@ public override async Task SetFilterConditionsAsync(FilterKeyValueAction filter)
128128
}
129129
await base.SetFilterConditionsAsync(filter);
130130
}
131+
132+
private async Task OnValueChanged(string? val)
133+
{
134+
_value1 = val;
135+
await OnFilterAsync();
136+
}
131137
}

0 commit comments

Comments
 (0)