Describe the bug
If FilterTemplate is defined and ClearFilterCommand is fired, filters will be removed, but old inputs bill stay in filter inputs.
To Reproduce
Steps to reproduce the behavior:
FilterTemplates)Expected behavior
Filter Templates will be reinitialize, so that old inputs removed by clear filter.
Screenshots



How do you bind values of input field and the filter context?
More or less like 'First Name' in DataGridPage.
...
<FilterTemplate>
<NumericEdit TValue="int?" Step="1" Decimals="0" Value="@Get(context)"
ValueChanged="@(value => Changed(value, context))" />
</FilterTemplate>
...
protected int? Get(FilterContext context)
{
var searchValue = context.SearchValue;
var hasFilter = int.TryParse(searchValue, out var filter);
int? value = null;
if (hasFilter)
{
value = filter;
}
return value;
}
protected void Changed(int? value, FilterContext context)
{
var searchValue = value?.ToString();
context.SearchValue = searchValue;
context.TriggerFilterChange(searchValue);
}
@stsrki Do i something wrong?
@DDDenisSobek I reproduced it on my side and it seems it's a bug. I will put on backlog for next milestone.
Most helpful comment
@DDDenisSobek I reproduced it on my side and it seems it's a bug. I will put on backlog for next milestone.