diff --git a/Source/Extensions/Blazorise.DataGrid/_DataGridPagination.razor b/Source/Extensions/Blazorise.DataGrid/_DataGridPagination.razor index c2cd42868c..64fdd8556a 100644 --- a/Source/Extensions/Blazorise.DataGrid/_DataGridPagination.razor +++ b/Source/Extensions/Blazorise.DataGrid/_DataGridPagination.razor @@ -11,7 +11,7 @@ { @columnChooserFragment } - @if ( GetPaginationPosition() == PagerElementPosition.Start || ( GetPaginationPosition() == PagerElementPosition.Default && !ShowButtonRow() ) ) + @if ( GetPaginationPosition() == PagerElementPosition.Start || ( GetPaginationPosition() == PagerElementPosition.Default && !ShowButtonRow ) ) { @paginationFragment } @@ -30,7 +30,7 @@ { @columnChooserFragment } - @if ( GetPaginationPosition() == PagerElementPosition.Center || ( GetPaginationPosition() == PagerElementPosition.Default && ShowButtonRow() ) ) + @if ( GetPaginationPosition() == PagerElementPosition.Center || ( GetPaginationPosition() == PagerElementPosition.Default && ShowButtonRow ) ) { @paginationFragment } @@ -63,7 +63,7 @@ @code { private RenderFragment buttonRowFragment => __builder => { - @if ( ShowButtonRow() ) + @if ( ShowButtonRow ) { @{ @@ -116,7 +116,7 @@ private RenderFragment columnChooserFragment => __builder => { - @if ( ShowColumnChooser() ) + @if ( ShowColumnChooser ) { diff --git a/Source/Extensions/Blazorise.DataGrid/_DataGridPagination.razor.cs b/Source/Extensions/Blazorise.DataGrid/_DataGridPagination.razor.cs index 7057050f0a..a8cd3f3a00 100644 --- a/Source/Extensions/Blazorise.DataGrid/_DataGridPagination.razor.cs +++ b/Source/Extensions/Blazorise.DataGrid/_DataGridPagination.razor.cs @@ -18,10 +18,10 @@ partial class _DataGridPagination : BaseComponent, IDisposable #region Methods - private bool ShowButtonRow() + private bool ShowButtonRow => ButtonRowTemplate is not null && ParentDataGrid.IsButtonRowVisible; - private bool ShowColumnChooser() + private bool ShowColumnChooser => ParentDataGrid.ShowColumnChooser; private PagerElementPosition GetButtonRowPosition()