File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
src/ProductConstructionService/ProductConstructionService.BarViz/Pages Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change 22
33@using Microsoft .DotNet .ProductConstructionService .Client
44@using Microsoft .DotNet .ProductConstructionService .Client .Models ;
5+ @using System .Linq .Expressions
56@inject IProductConstructionServiceApi api
67
78<PageTitle >Tracked Pull Requests</PageTitle >
89
910<GridViewTemplate Title =" Pull Requests" ShowSkeleton =" TrackedPullRequests == null" >
1011 <Content >
1112 <FluentDataGrid Id =" pullRequestsGrid" Items =" @TrackedPullRequests" GridTemplateColumns =" 2fr 1fr 1fr" TGridItem =TrackedPullRequest Style =" width: 100%" >
12- <TemplateColumn Sortable =" true" Align =" Align.Start" Title =" Pull request" >
13+ <TemplateColumn Sortable =" true" SortBy = " SortBy(pr => pr.Url) " Align =" Align.Start" Title =" Pull request" >
1314 <FluentAnchor Href =" @context.Url" Target =" _blank" Appearance =" Appearance.Hypertext" >@context.Url </FluentAnchor >
1415 </TemplateColumn >
15- <TemplateColumn Sortable =" true" Align =" Align.Center" Title =" Channel" >
16+ <TemplateColumn Sortable =" true" SortBy = " SortBy(pr => pr.Channel) " Align =" Align.Center" Title =" Channel" >
1617 @if (context .Channel != null )
1718 {
1819 <FluentLabel >@context.Channel </FluentLabel >
2627 </FluentLabel >
2728 }
2829 </TemplateColumn >
29- <TemplateColumn Sortable =" true" Align =" Align.Center" Title =" Target branch" >
30+ <TemplateColumn Sortable =" true" SortBy = " SortBy(pr => pr.TargetBranch) " Align =" Align.Center" Title =" Target branch" >
3031 @if (context .TargetBranch != null )
3132 {
3233 <FluentLabel >@context.TargetBranch </FluentLabel >
4748@code {
4849 IQueryable <TrackedPullRequest >? TrackedPullRequests = null ;
4950 Timer ? _timer ;
51+ GridSort <TrackedPullRequest > SortBy (Expression < Func < TrackedPullRequest , string >> sorter )
52+ => GridSort <TrackedPullRequest >.ByAscending (sorter );
5053
5154 protected override async Task OnInitializedAsync ()
5255 {
You can’t perform that action at this time.
0 commit comments