Class MBPagedDataList<TItem>
A paged data list using the "wig pig" construct allowing the consumer to free render the relevant paged data.
public class MBPagedDataList<TItem> : ComponentFoundation, IComponent, IHandleEvent, IHandleAfterRender, IDisposable
Type Parameters
TItem
- Inheritance
-
MBPagedDataList<TItem>
- Implements
- Inherited Members
Constructors
MBPagedDataList()
public MBPagedDataList()
Properties
CurrentPage
public IEnumerable<TItem> CurrentPage { get; }
Property Value
- IEnumerable<TItem>
Data
The pageable data.
[Parameter]
public IEnumerable<TItem> Data { get; set; }
Property Value
- IEnumerable<TItem>
GetKeysFunc
A function delegate to return the parameters for @key
attributes. If unused
"fake" keys set to GUIDs will be used.
[Parameter]
public Func<TItem, object> GetKeysFunc { get; set; }
Property Value
ItemTemplate
The wig pig item renderfragment.
[Parameter]
public RenderFragment<TItem> ItemTemplate { get; set; }
Property Value
- RenderFragment<TItem>
ItemsPerPage
The number of items per page.
[Parameter]
public int ItemsPerPage { get; set; }
Property Value
ItemsPerPageChanged
Change handler for ItemsPerPage.
[Parameter]
public EventCallback<int> ItemsPerPageChanged { get; set; }
Property Value
ItemsPerPageSelection
A list of allowable numbers of items per page for the paginator.
[Parameter]
public IEnumerable<int> ItemsPerPageSelection { get; set; }
Property Value
ListTemplate
The wig pig list renderfragment.
[Parameter]
public RenderFragment<RenderFragment> ListTemplate { get; set; }
Property Value
ListTemplateClass
A CSS class to apply to the div surrounding the paged data.
[Parameter]
public string ListTemplateClass { get; set; }
Property Value
PageNumber
The page number.
[Parameter]
public int PageNumber { get; set; }
Property Value
PageNumberChanged
Change handler for PageNumber.
[Parameter]
public EventCallback<int> PageNumberChanged { get; set; }
Property Value
PaginatorClass
A class for the paginator.
[Parameter]
public string PaginatorClass { get; set; }
Property Value
Methods
BuildRenderTree(RenderTreeBuilder)
Renders the component to the supplied RenderTreeBuilder.
protected override void BuildRenderTree(RenderTreeBuilder __builder)
Parameters
__builder
RenderTreeBuilder
OnAfterRenderAsync(bool)
Material.Blazor components generally should not override this because it handles the case where components need
to be adjusted when inside an MBDialog
or MBCard
.
protected override Task OnAfterRenderAsync(bool firstRender)
Parameters
firstRender
bool
Returns
OnInitializedAsync()
Method invoked when the component is ready to start, having received its initial parameters from its parent in the render tree.
Override this method if you will perform an asynchronous operation and want the component to refresh when that operation is completed.
protected override Task OnInitializedAsync()
Returns
OnParametersSetAsync()
When overriding this, call await base.OnParametersSetAsync();
before any user code unless there is a very good reason not to.
protected override Task OnParametersSetAsync()