Skip to content

Commit 723e7f1

Browse files
committed
Adds release notes, adds note about in-memory data.
1 parent 20f2242 commit 723e7f1

File tree

5 files changed

+18
-3
lines changed

5 files changed

+18
-3
lines changed

Documentation/Blazorise.Docs/Pages/Docs/Extensions/DataGrid/DataGridApi.razor

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -485,6 +485,10 @@
485485
<DocsAttributesItem Name="SortDirection" Type="SortDirection" Default="Default">
486486
Column initial sort direction.
487487
</DocsAttributesItem>
488+
<DocsAttributesItem Name="SortComparer" Type="IComparer<TItem>" Default="null">
489+
Gets or sets the custom comparer used for sorting the items in this column.
490+
Note that this comparer can only be used with in-memory data.
491+
</DocsAttributesItem>
488492
<DocsAttributesItem Name="ReverseSorting" Type="bool" Default="false">
489493
Whether the sort direction will be reversed.
490494
</DocsAttributesItem>

Documentation/Blazorise.Docs/Pages/Docs/Extensions/DataGrid/Features/SortingPage.razor

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,10 +64,11 @@
6464

6565

6666
<DocsPageSection>
67-
<DocsPageSectionHeader Title="Sort Comparer">
67+
<DocsPageSectionHeader Title="SortComparer">
6868
<Paragraph>
6969
The <code>SortComparer</code> feature allows you to define a custom sorting logic for a column by specifying an <code>IComparer&lt;TItem&gt;</code> implementation.
7070
This is useful when you want to sort data based on complex or calculated criteria that go beyond the default alphabetical or numerical order.
71+
Note that this comparer can only be used with in-memory data.
7172
</Paragraph>
7273
<Paragraph>
7374
In this example, a custom comparer is applied to sort by the <code>FirstName</code> length, and then, for items with the same first name length, alphabetically by <code>LastName</code>.
@@ -76,7 +77,7 @@
7677
</Paragraph>
7778
</DocsPageSectionHeader>
7879
<DocsPageSectionContent FullWidth Outlined>
79-
<DataGridComparerExample />
80+
<DataGridSortComparerExample />
8081
</DocsPageSectionContent>
8182
<DocsPageSectionSource Code="DataGridSortComparerExample" />
8283
</DocsPageSection>

Documentation/Blazorise.Docs/Pages/News/2024-10-15-release-notes-170.razor

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,15 @@
210210
Added <Code>FixedColumnsPositionSync</Code> parameter. This parameter allows you to keep synchronizing the fixed columns, this is useful when you want to be adding new columns dynamically, and the columns need to be recalculated.
211211
</Paragraph>
212212

213+
<Heading Size="HeadingSize.Is4">
214+
New Parameter: SortComparer
215+
</Heading>
216+
217+
<Paragraph>
218+
Added <Code>SortComparer</Code> parameter. This parameter allows you to provide a custom comparer for sorting items in a column using custom logic. Note that this comparer can only be used with in-memory data sources.
219+
</Paragraph>
220+
221+
213222
<Heading Size="HeadingSize.Is4">
214223
SelectedCell API
215224
</Heading>

Source/Extensions/Blazorise.DataGrid/DataGridColumn.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -746,7 +746,8 @@ public SortDirection CurrentSortDirection
746746
[Parameter] public SortDirection SortDirection { get; set; }
747747

748748
/// <summary>
749-
/// Gets or sets the custom comparer used for sorting the items in this column.
749+
/// Gets or sets the custom comparer used for sorting the items in this column.
750+
/// Note that this comparer can only be used with in-memory data.
750751
/// </summary>
751752
[Parameter] public IComparer<TItem> SortComparer { get; set; }
752753

0 commit comments

Comments
 (0)