Skip to content

Commit 1c3cff0

Browse files
QuickGrid: Adds option to disable rendering of filler rows #57199 #59096
1 parent 062e663 commit 1c3cff0

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

src/Components/QuickGrid/Microsoft.AspNetCore.Components.QuickGrid/src/Pagination/PaginationState.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,11 @@ namespace Microsoft.AspNetCore.Components.QuickGrid;
1010
/// </summary>
1111
public class PaginationState
1212
{
13+
/// <summary>
14+
/// Whether or not to render empty rows to fill the view.
15+
/// </summary>
16+
public bool RenderFillerRows = true;
17+
1318
/// <summary>
1419
/// Gets or sets the number of items on each page.
1520
/// </summary>

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
// When pagination is enabled, by default ensure we render the exact number of expected rows per page,
5050
// even if there aren't enough data items. This avoids the layout jumping on the last page.
5151
// Consider making this optional.
52-
if (Pagination is not null)
52+
if (Pagination is not null && Pagination.RenderFillerRows)
5353
{
5454
while (rowIndex++ < initialRowIndex + Pagination.ItemsPerPage)
5555
{

0 commit comments

Comments
 (0)