-
Notifications
You must be signed in to change notification settings - Fork 380
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[DataGrid] Allow programmatic sorting of columns by name or index (#2156
) * Add options to allow programmatic sorting of columns by column name or column index * Added unit tests * Use method overloads instead of explicit method names. --------- Co-authored-by: Kevin Becker <[email protected]> Co-authored-by: Vincent Baaij <[email protected]>
- Loading branch information
1 parent
f4e792c
commit 078d2b0
Showing
8 changed files
with
355 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 31 additions & 0 deletions
31
...d/DataGridSortByTests.DataGridSortByTests_SortByColumnIndex_Ascending.verified.razor.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
|
||
<fluent-data-grid generate-header="none" aria-rowcount="5" blazor:onrowfocus="1" blazor:onclosecolumnoptions="2" b-ppmhrkw1mj="" blazor:elementreference=""> | ||
<fluent-data-grid-row row-id="r1" row-index="0" row-type="header" blazor:onkeydown="3" blazor:onclick="4" blazor:ondblclick="5" blazor:oncellfocus="6" b-upi3f9mbnn=""> | ||
<fluent-data-grid-cell cell-id="c1" cell-type="columnheader" grid-column="1" class="column-header col-justify-start col-sort-asc" aria-sort="ascending" scope="col" b-w6qdxfylwy=""> | ||
<div class="col-title" b-pxhtqoo8qd=""> | ||
<div class="col-title-text" b-pxhtqoo8qd="">Item1</div> | ||
</div> | ||
</fluent-data-grid-cell> | ||
<fluent-data-grid-cell cell-id="c2" cell-type="columnheader" grid-column="2" class="column-header col-justify-start " aria-sort="none" scope="col" b-w6qdxfylwy=""> | ||
<div class="col-title" b-pxhtqoo8qd=""> | ||
<div class="col-title-text" b-pxhtqoo8qd="">Item2</div> | ||
</div> | ||
</fluent-data-grid-cell> | ||
</fluent-data-grid-row> | ||
<fluent-data-grid-row row-id="r3" row-index="2" row-type="default" blazor:onkeydown="11" blazor:onclick="12" blazor:ondblclick="13" aria-rowindex="2" blazor:oncellfocus="14" b-upi3f9mbnn=""> | ||
<fluent-data-grid-cell cell-id="c5" cell-type="default" grid-column="1" class="col-justify-start " b-w6qdxfylwy="">A</fluent-data-grid-cell> | ||
<fluent-data-grid-cell cell-id="c6" cell-type="default" grid-column="2" class="col-justify-start " b-w6qdxfylwy="">D</fluent-data-grid-cell> | ||
</fluent-data-grid-row> | ||
<fluent-data-grid-row row-id="r2" row-index="1" row-type="default" blazor:onkeydown="7" blazor:onclick="8" blazor:ondblclick="9" aria-rowindex="3" blazor:oncellfocus="10" b-upi3f9mbnn=""> | ||
<fluent-data-grid-cell cell-id="c3" cell-type="default" grid-column="1" class="col-justify-start " b-w6qdxfylwy="">B</fluent-data-grid-cell> | ||
<fluent-data-grid-cell cell-id="c4" cell-type="default" grid-column="2" class="col-justify-start " b-w6qdxfylwy="">C</fluent-data-grid-cell> | ||
</fluent-data-grid-row> | ||
<fluent-data-grid-row row-id="r5" row-index="4" row-type="default" blazor:onkeydown="19" blazor:onclick="20" blazor:ondblclick="21" aria-rowindex="4" blazor:oncellfocus="22" b-upi3f9mbnn=""> | ||
<fluent-data-grid-cell cell-id="c9" cell-type="default" grid-column="1" class="col-justify-start " b-w6qdxfylwy="">C</fluent-data-grid-cell> | ||
<fluent-data-grid-cell cell-id="c10" cell-type="default" grid-column="2" class="col-justify-start " b-w6qdxfylwy="">B</fluent-data-grid-cell> | ||
</fluent-data-grid-row> | ||
<fluent-data-grid-row row-id="r4" row-index="3" row-type="default" blazor:onkeydown="15" blazor:onclick="16" blazor:ondblclick="17" aria-rowindex="5" blazor:oncellfocus="18" b-upi3f9mbnn=""> | ||
<fluent-data-grid-cell cell-id="c7" cell-type="default" grid-column="1" class="col-justify-start " b-w6qdxfylwy="">D</fluent-data-grid-cell> | ||
<fluent-data-grid-cell cell-id="c8" cell-type="default" grid-column="2" class="col-justify-start " b-w6qdxfylwy="">A</fluent-data-grid-cell> | ||
</fluent-data-grid-row> | ||
</fluent-data-grid> |
Oops, something went wrong.