Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/villainoustourist/blazor.pagination
A reusable pagination component for Blazor.
https://github.com/villainoustourist/blazor.pagination
asp-net-core blazor pagination
Last synced: about 1 month ago
JSON representation
A reusable pagination component for Blazor.
- Host: GitHub
- URL: https://github.com/villainoustourist/blazor.pagination
- Owner: villainoustourist
- License: mit
- Created: 2018-12-17T22:04:30.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2023-02-02T11:59:43.000Z (almost 2 years ago)
- Last Synced: 2024-11-03T08:08:15.338Z (2 months ago)
- Topics: asp-net-core, blazor, pagination
- Language: HTML
- Size: 258 KB
- Stars: 38
- Watchers: 3
- Forks: 18
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Blazor.Pagination
A reusable pagination component for .NET Core Blazor.[![Build Status](https://kfranken.visualstudio.com/Personal/_apis/build/status/Build%20%26%20Publish%20Blazor%20Pagination?branchName=master)](https://kfranken.visualstudio.com/Personal/_build/latest?definitionId=13&branchName=master)
[![Package Version](https://img.shields.io/nuget/v/BlazorPagination.svg)](https://www.nuget.org/packages/BlazorPagination/)
[![NuGet Downloads](https://img.shields.io/nuget/dt/BlazorPagination.svg)](https://www.nuget.org/packages/BlazorPagination/)
[![License](https://img.shields.io/github/license/villainoustourist/Blazor.Pagination.svg)](https://github.com/villainoustourist/Blazor.Pagination/blob/master/LICENSE)## Installation
Add the BlazorPagination NuGet package to your .NET Core Blazor app using the following command in the Package Manager Console:
```
PM> Install-Package BlazorPagination
```
or using .NET CLI run the following command
```
dotnet add package BlazorPagination
```Once you have installed the package add the following line in the ```_ViewImports.cshtml``` file
```
@addTagHelper *,BlazorPagination
```
## Usage```
...
@using BlazorPagination
...
@foreach (var item in _data.Results)
{
@item
}
...
@code {
private PagedResult _data;
private string _filter;
private int _page = 1;
protected override OnInitialized()
{
_data = FetchData(_filter, _page);
}
}
```Default HTML output:
```
```