File tree Expand file tree Collapse file tree 2 files changed +24
-6
lines changed
src/BootstrapBlazor/Components/Filters Expand file tree Collapse file tree 2 files changed +24
-6
lines changed Original file line number Diff line number Diff line change 11@namespace BootstrapBlazor.Components
22@inherits FilterBase
33
4- <div ></div >
4+ <div >@NotSupportedMessage </div >
Original file line number Diff line number Diff line change 33// See the LICENSE file in the project root for more information.
44// Maintainer: Argo Zhang([email protected] ) Website: https://www.blazor.zone 55
6+ using Microsoft . Extensions . Localization ;
7+
68namespace BootstrapBlazor . Components ;
79
810/// <summary>
911/// NotSupportFilter component
1012/// </summary>
1113public partial class NotSupportFilter
1214{
13- private string ? FilterRowClassString => CssBuilder . Default ( "filter-row" )
14- . AddClass ( "active" , TableColumnFilter . HasFilter ( ) )
15- . Build ( ) ;
15+ [ Inject ]
16+ [ NotNull ]
17+ private IStringLocalizer < TableColumnFilter > ? Localizer { get ; set ; }
18+
19+ /// <summary>
20+ /// 获得/设置 不支持过滤类型提示信息 默认 null 读取资源文件内容
21+ /// </summary>
22+ [ Parameter ]
23+ public string ? NotSupportedMessage { get ; set ; }
24+
25+ /// <summary>
26+ /// <inheritdoc/>
27+ /// </summary>
28+ protected override void OnParametersSet ( )
29+ {
30+ base . OnParametersSet ( ) ;
31+
32+ NotSupportedMessage ??= Localizer [ nameof ( NotSupportedMessage ) ] ;
33+ }
1634
1735 /// <summary>
1836 /// <inheritdoc/>
@@ -26,8 +44,8 @@ public override FilterKeyValueAction GetFilterConditions()
2644 /// <summary>
2745 /// <inheritdoc/>
2846 /// </summary>
29- public override async Task SetFilterConditionsAsync ( FilterKeyValueAction filter )
47+ public override void Reset ( )
3048 {
31- await base . SetFilterConditionsAsync ( filter ) ;
49+
3250 }
3351}
You can’t perform that action at this time.
0 commit comments