Skip to content

Commit

Permalink
Prefer Getter Property
Browse files Browse the repository at this point in the history
  • Loading branch information
David-Moreira committed Feb 22, 2024
1 parent 68a023f commit dbc68e5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
{
@columnChooserFragment
}
@if ( GetPaginationPosition() == PagerElementPosition.Start || ( GetPaginationPosition() == PagerElementPosition.Default && !ShowButtonRow() ) )
@if ( GetPaginationPosition() == PagerElementPosition.Start || ( GetPaginationPosition() == PagerElementPosition.Default && !ShowButtonRow ) )
{
@paginationFragment
}
Expand All @@ -30,7 +30,7 @@
{
@columnChooserFragment
}
@if ( GetPaginationPosition() == PagerElementPosition.Center || ( GetPaginationPosition() == PagerElementPosition.Default && ShowButtonRow() ) )
@if ( GetPaginationPosition() == PagerElementPosition.Center || ( GetPaginationPosition() == PagerElementPosition.Default && ShowButtonRow ) )
{
@paginationFragment
}
Expand Down Expand Up @@ -63,7 +63,7 @@
@code {
private RenderFragment buttonRowFragment => __builder =>
{
@if ( ShowButtonRow() )
@if ( ShowButtonRow )
{
<Field Display="Blazorise.Display.InlineBlock">
@{
Expand Down Expand Up @@ -116,7 +116,7 @@

private RenderFragment columnChooserFragment => __builder =>
{
@if ( ShowColumnChooser() )
@if ( ShowColumnChooser )
{
<Field Display="Blazorise.Display.InlineBlock">
<Dropdown @bind-Visible="@dropdownColumnChooserVisible">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ partial class _DataGridPagination<TItem> : 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()
Expand Down

0 comments on commit dbc68e5

Please sign in to comment.