File tree Expand file tree Collapse file tree 2 files changed +11
-6
lines changed
src/Components/QuickGrid/Microsoft.AspNetCore.Components.QuickGrid/src Expand file tree Collapse file tree 2 files changed +11
-6
lines changed Original file line number Diff line number Diff line change 1010 @{ FinishCollectingColumns (); }
1111 <ColumnsCollectedNotifier TGridItem =" TGridItem" />
1212
13- <table theme =" @Theme" aria-rowcount =" @(_ariaBodyRowCount + 1)" @ref =" _tableReference" @onclosecolumnoptions =" CloseColumnOptions " @attributes =" AdditionalAttributes" class =" @GridClass()" >
13+ <table theme =" @Theme" aria-rowcount =" @(_ariaBodyRowCount + 1)" @ref =" _tableReference" @onclosecolumnoptions =" CloseColumnOptionsAsync " @attributes =" AdditionalAttributes" class =" @GridClass()" >
1414 <thead >
1515 <tr >
1616 @_renderColumnHeaders
Original file line number Diff line number Diff line change @@ -272,6 +272,16 @@ public Task ShowColumnOptionsAsync(ColumnBase<TGridItem> column)
272272 return Task . CompletedTask ;
273273 }
274274
275+ /// <summary>
276+ /// Closes the <see cref="ColumnBase{TGridItem}.ColumnOptions"/> UI that was previously displayed.
277+ /// </summary>
278+ public Task CloseColumnOptionsAsync ( )
279+ {
280+ _displayOptionsForColumn = null ;
281+ StateHasChanged ( ) ;
282+ return Task . CompletedTask ;
283+ }
284+
275285 /// <summary>
276286 /// Instructs the grid to re-fetch and render the current data from the supplied data source
277287 /// (either <see cref="Items"/> or <see cref="ItemsProvider"/>).
@@ -440,9 +450,4 @@ public async ValueTask DisposeAsync()
440450 // the client disconnected. This is not an error.
441451 }
442452 }
443-
444- private void CloseColumnOptions ( )
445- {
446- _displayOptionsForColumn = null ;
447- }
448453}
You can’t perform that action at this time.
0 commit comments