Skip to content

Commit 237d36e

Browse files
authored
[Blazor] Changes from API proposal for CloseColumnOptionsAsync (#61154)
* [Blazor] Changes from API proposal for CloseColumnOptionsAsync
1 parent 6d45973 commit 237d36e

File tree

5 files changed

+6
-6
lines changed

5 files changed

+6
-6
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
#nullable enable
2-
Microsoft.AspNetCore.Components.QuickGrid.QuickGrid<TGridItem>.CloseColumnOptionsAsync() -> System.Threading.Tasks.Task!
2+
Microsoft.AspNetCore.Components.QuickGrid.QuickGrid<TGridItem>.HideColumnOptionsAsync() -> System.Threading.Tasks.Task!
33
Microsoft.AspNetCore.Components.QuickGrid.QuickGrid<TGridItem>.RowClass.get -> System.Func<TGridItem, string?>?
44
Microsoft.AspNetCore.Components.QuickGrid.QuickGrid<TGridItem>.RowClass.set -> void

src/Components/QuickGrid/Microsoft.AspNetCore.Components.QuickGrid/src/QuickGrid.razor

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
@{ FinishCollectingColumns(); }
1111
<ColumnsCollectedNotifier TGridItem="TGridItem" />
1212

13-
<table theme="@Theme" aria-rowcount="@(_ariaBodyRowCount + 1)" @ref="_tableReference" @onclosecolumnoptions="CloseColumnOptionsAsync" @attributes="AdditionalAttributes" class="@GridClass()">
13+
<table theme="@Theme" aria-rowcount="@(_ariaBodyRowCount + 1)" @ref="_tableReference" @onclosecolumnoptions="HideColumnOptionsAsync" @attributes="AdditionalAttributes" class="@GridClass()">
1414
<thead>
1515
<tr>
1616
@_renderColumnHeaders

src/Components/QuickGrid/Microsoft.AspNetCore.Components.QuickGrid/src/QuickGrid.razor.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ public Task ShowColumnOptionsAsync(ColumnBase<TGridItem> column)
280280
/// <summary>
281281
/// Closes the <see cref="ColumnBase{TGridItem}.ColumnOptions"/> UI that was previously displayed.
282282
/// </summary>
283-
public Task CloseColumnOptionsAsync()
283+
public Task HideColumnOptionsAsync()
284284
{
285285
_displayOptionsForColumn = null;
286286
StateHasChanged();

src/Components/test/E2ETest/Tests/QuickGridTest.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -177,14 +177,14 @@ public void CanCloseColumnOptionsByBlurring()
177177
}
178178

179179
[Fact]
180-
public void CanCloseColumnOptionsByCloseColumnOptionsAsync()
180+
public void CanCloseColumnOptionsByHideColumnOptionsAsync()
181181
{
182182
var grid = app.FindElement(By.CssSelector("#grid > table"));
183183
var firstNameColumnOptionsButton = grid.FindElement(By.CssSelector("thead > tr > th:nth-child(2) > div > button[title=\"Column options\"]"));
184184

185185
firstNameColumnOptionsButton.Click();
186186

187-
// Click the button inside the column options popup to close, which calls QuickGrid.CloseColumnOptionsAsync
187+
// Click the button inside the column options popup to close, which calls QuickGrid.HideColumnOptionsAsync
188188
grid.FindElement(By.CssSelector("#close-column-options")).Click();
189189

190190
var firstNameSearchSelector = "#grid > table > thead > tr > th:nth-child(2) input[type=search]";

src/Components/test/testassets/BasicTestApp/QuickGridTest/SampleQuickGridComponent.razor

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
<div class="search-box">
1111
<input type="search" autofocus @bind="firstNameFilter" @bind:event="oninput" placeholder="First name..." />
1212
</div>
13-
<button type="button" id="close-column-options" @onclick="@(() => quickGridRef.CloseColumnOptionsAsync())">Close Column Options</button>
13+
<button type="button" id="close-column-options" @onclick="@(() => quickGridRef.HideColumnOptionsAsync())">Close Column Options</button>
1414
</ColumnOptions>
1515
</PropertyColumn>
1616
<PropertyColumn Property="@(p => p.LastName)" Sortable="true" />

0 commit comments

Comments
 (0)