File tree Expand file tree Collapse file tree
src/EventLogExpert/Shared/Components Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -42,7 +42,7 @@ private void OnInputChanged(ChangeEventArgs e)
4242 _errorMessage = message ;
4343 }
4444
45- InvokeAsync ( StateHasChanged ) ;
45+ _ = InvokeAsync ( StateHasChanged ) ;
4646 } , e . Value , 250 , 0 ) ;
4747 }
4848
Original file line number Diff line number Diff line change @@ -37,7 +37,7 @@ protected override void OnInitialized()
3737 private void AddFavorite ( string filter ) =>
3838 Dispatcher . Dispatch ( new FilterCacheAction . AddFavoriteFilter ( filter ) ) ;
3939
40- private async void AddFilter ( string filter )
40+ private async Task AddFilter ( string filter )
4141 {
4242 Dispatcher . Dispatch (
4343 new FilterPaneAction . AddFilter (
Original file line number Diff line number Diff line change @@ -31,9 +31,16 @@ private async Task ApplyFilters()
3131 await InvokeAsync ( Parent . Close ) ;
3232 }
3333
34- private void CopyGroup ( ) => Clipboard . SetTextAsync ( Group . Filters . Count > 1 ?
35- string . Join ( " || " , Group . Filters . Select ( filter => $ "({ filter . Comparison . Value } )") ) :
36- Group . Filters [ 0 ] . Comparison . Value ) ;
34+ private void CopyGroup ( )
35+ {
36+ if ( Group . Filters . Count <= 0 ) { return ; }
37+
38+ var text = Group . Filters . Count > 1 ?
39+ string . Join ( " || " , Group . Filters . Select ( filter => $ "({ filter . Comparison . Value } )") ) :
40+ Group . Filters [ 0 ] . Comparison . Value ;
41+
42+ _ = Clipboard . SetTextAsync ( text ) ;
43+ }
3744
3845 private async Task ExportGroup ( )
3946 {
Original file line number Diff line number Diff line change @@ -137,7 +137,7 @@ protected override async Task OnAfterRenderAsync(bool firstRender)
137137 await base . OnAfterRenderAsync ( firstRender ) ;
138138 }
139139
140- private async void HandleKeyDown ( KeyboardEventArgs args )
140+ private async Task HandleKeyDown ( KeyboardEventArgs args )
141141 {
142142 switch ( args . Code )
143143 {
@@ -184,7 +184,7 @@ private async void HandleKeyDown(KeyboardEventArgs args)
184184 _preventDefault = false ;
185185 }
186186
187- private async void OnInputChange ( ChangeEventArgs args )
187+ private async Task OnInputChange ( ChangeEventArgs args )
188188 {
189189 Value = ( T ) Convert . ChangeType ( args . Value , typeof ( T ) ) ! ;
190190 await ValueChanged . InvokeAsync ( Value ) ;
@@ -239,6 +239,6 @@ private async Task SelectAdjacentItem(int direction)
239239 }
240240 }
241241
242- private async void ToggleDropDownVisibility ( ) =>
242+ private async Task ToggleDropDownVisibility ( ) =>
243243 await JSRuntime . InvokeVoidAsync ( "toggleDropdown" , _selectComponent ) ;
244244}
Original file line number Diff line number Diff line change @@ -57,7 +57,7 @@ private void HighlightItem()
5757 _parent . HighlightedItem = this ;
5858 }
5959
60- private async void SelectItem ( )
60+ private async Task SelectItem ( )
6161 {
6262 if ( IsDisabled ) { return ; }
6363
You can’t perform that action at this time.
0 commit comments