Soenneker.Quark.Table
3.0.38
Prefix Reserved
dotnet add package Soenneker.Quark.Table --version 3.0.38
NuGet\Install-Package Soenneker.Quark.Table -Version 3.0.38
<PackageReference Include="Soenneker.Quark.Table" Version="3.0.38" />
<PackageVersion Include="Soenneker.Quark.Table" Version="3.0.38" />
<PackageReference Include="Soenneker.Quark.Table" />
paket add Soenneker.Quark.Table --version 3.0.38
#r "nuget: Soenneker.Quark.Table, 3.0.38"
#:package Soenneker.Quark.Table@3.0.38
#addin nuget:?package=Soenneker.Quark.Table&version=3.0.38
#tool nuget:?package=Soenneker.Quark.Table&version=3.0.38
Soenneker.Quark.Table
A modern, component-driven Blazor table library that provides complete control over table structure and behavior through Razor components.
Features
- Component-Driven: Every part of the table is a separate Razor component
- Full Control: Users define table structure using Blazor markup
- Sortable Headers: Individual column headers can be made sortable
- Search Integration: Built-in search functionality with debouncing
- Pagination: Server-side pagination with customizable controls
- Server-Side Processing: Full support for server-side data processing
- Continuation Token Support: Advanced pagination with continuation tokens
- Loading States: Smooth loading behavior with overlay
Components
Core Components
- QuarkTable: Main container component that manages state and events
- QuarkTableElement: Table wrapper component
- QuarkThead: Table header container
- QuarkTh: Table header cell with optional sorting
- QuarkTbody: Table body container
- QuarkTr: Table row component
- QuarkTd: Table data cell component
Feature Components
- QuarkTableSearch: Standalone search component
- QuarkTablePagination: Pagination controls component
- QuarkTableInfo: Information display component (shows "x-y of z" format)
- QuarkTableBottomBar: Bottom bar layout wrapper for info and pagination components
- QuarkTableTopBar: Top bar layout component for header content
- QuarkTableLeft: Left-aligned container component for use in topbar/bottombar
- QuarkTableRight: Right-aligned container component for use in topbar/bottombar
- QuarkTableBarControls: Container for buttons and custom controls
- QuarkTableNoData: No data state component with customizable content
- QuarkTableLoader: Loading state component
- QuarkTablePageSizeSelector: Page size selector component
Legacy Components
- QuarkTableControls: Legacy name for QuarkTableBottomBar (still supported)
Basic Usage
<QuarkTable TotalRecords="100" OnInteraction="OnInteraction">
<QuarkTableSearch Placeholder="Search employees..." />
<QuarkTableElement>
<QuarkThead>
<QuarkTr>
<QuarkTh Sortable="true" Searchable="true">Name</QuarkTh>
<QuarkTh Sortable="true" Searchable="true">Email</QuarkTh>
<QuarkTh Sortable="false" Searchable="true">Age</QuarkTh>
</QuarkTr>
</QuarkThead>
<QuarkTbody>
@foreach (var person in people)
{
<QuarkTr Key="@person.Id">
<QuarkTd>@person.Name</QuarkTd>
<QuarkTd>@person.Email</QuarkTd>
<QuarkTd>@person.Age</QuarkTd>
</QuarkTr>
}
</QuarkTbody>
</QuarkTableElement>
<QuarkTablePagination />
</QuarkTable>
Custom Components
QuarkTableNoData
Display a custom "no data" state when there are no records to show:
<QuarkTableNoData>
<div style="text-align: center; padding: 2rem;">
<h4>No records found</h4>
<p>Try adjusting your search criteria.</p>
</div>
</QuarkTableNoData>
QuarkTableInfo
Display table information independently of pagination:
<QuarkTableInfo />
<QuarkTableInfo>
<span>Showing @start-@end of @total records</span>
Bar Layout Positioning
The QuarkTableBottomBar
and QuarkTableTopBar
components support layout classes to control positioning when only one section is present:
Bottom Bar - Right Only
When only QuarkTableRight
is specified in the bottom bar, use the only-right
layout class to position it to the right:
<QuarkTableBottomBar LayoutClass="only-right">
<QuarkTableRight>
<QuarkTableInfo />
<QuarkTablePagination />
</QuarkTableRight>
</QuarkTableBottomBar>
Top Bar - Left Only
When only QuarkTableLeft
is specified in the top bar, use the only-left
layout class to anchor it to the right:
<QuarkTableTopBar LayoutClass="only-left">
<QuarkTableLeft>
<QuarkTableSearch Placeholder="Search..." />
</QuarkTableLeft>
</QuarkTableTopBar>
Standard Layout
When both left and right sections are present, no layout class is needed:
<QuarkTableBottomBar>
<QuarkTableLeft>
<QuarkTableInfo />
</QuarkTableLeft>
<QuarkTableRight>
<QuarkTablePagination />
</QuarkTableRight>
</QuarkTableBottomBar>
</QuarkTableInfo>
### QuarkTableBottomBar
Layout wrapper that combines info and pagination components with flexible layout options:
```razor
<QuarkTableBottomBar>
<QuarkTableLeft>
<QuarkTableInfo />
</QuarkTableLeft>
<QuarkTableRight>
<QuarkTablePagination />
</QuarkTableRight>
</QuarkTableBottomBar>
<QuarkTableBottomBar ControlsLayout="QuarkTableControlsLayout.InfoRightPaginationLeft">
<QuarkTableInfo />
<QuarkTablePagination />
</QuarkTableBottomBar>
<QuarkTableBottomBar>
<QuarkTableLeft>
<QuarkTableInfo />
<QuarkTablePageSizeSelector />
</QuarkTableLeft>
<QuarkTableRight>
<QuarkTablePagination />
</QuarkTableRight>
</QuarkTableBottomBar>
Server-Side Processing
private async Task OnInteraction(DataTableServerSideRequest request)
{
var query = dbContext.Employees.AsQueryable();
// Apply search
if (!string.IsNullOrEmpty(request.Search?.Value))
{
var searchTerm = request.Search.Value.ToLower();
query = query.Where(e =>
e.Name.ToLower().Contains(searchTerm) ||
e.Email.ToLower().Contains(searchTerm));
}
// Apply sorting
if (request.Order?.Any() == true)
{
foreach (var order in request.Order)
{
query = order.Column switch
{
0 => order.Dir == "asc" ? query.OrderBy(e => e.Name) : query.OrderByDescending(e => e.Name),
1 => order.Dir == "asc" ? query.OrderBy(e => e.Email) : query.OrderByDescending(e => e.Email),
_ => query
};
}
}
var totalRecords = await query.CountAsync();
var pagedData = await query.Skip(request.Start).Take(request.Length).ToListAsync();
currentData = pagedData;
totalRecords = totalRecords;
StateHasChanged();
}
Continuation Token Support
private async Task OnInteraction(DataTableServerSideRequest request)
{
PagedResult<Employee> pagedResult = await EmployeeService.GetEmployeesPaged(request);
_currentEmployees = pagedResult.Items;
if (_quarkTable != null)
{
_quarkTable.UpdateContinuationTokenPaging(
pagedResult.Items.Count,
pagedResult.ContinuationToken,
request.ContinuationToken);
}
}
Key Parameters
QuarkTable
Parameter | Type | Default | Description |
---|---|---|---|
TotalRecords |
int |
0 |
Total number of records for pagination |
Visible |
bool |
true |
Whether the table is visible |
OnManualRequest |
EventCallback<DataTableServerSideRequest> |
- | Server-side data processing callback |
OnOrder |
EventCallback<QuarkTableOrderEventArgs> |
- | Called when column sorting changes |
Options |
QuarkTableOptions |
new() |
Table configuration options |
QuarkTh
Parameter | Type | Default | Description |
---|---|---|---|
Sortable |
bool |
true |
Enable sorting for this column |
Searchable |
bool |
true |
Enable search for this column |
QuarkTableOptions
Property | Type | Default | Description |
---|---|---|---|
DefaultPageSize |
int |
10 |
Default page size |
SearchDebounceMs |
int |
300 |
Search debounce delay in milliseconds |
SearchPosition |
SearchPosition |
End |
Position of the search box |
Debug |
bool |
false |
Enable debug logging |
Events
OnInitialize
: Called when the table is initializedOnManualRequest
: Called when data needs to be loadedOnOrder
: Called when column sorting changesOnPageSizeChanged
: Called when page size changesOnGoToPage
: Called when navigating to a specific page
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net9.0
- Microsoft.AspNetCore.Components.Web (>= 9.0.8)
- Soenneker.Blazor.Utils.ResourceLoader (>= 3.0.1493)
- Soenneker.DataTables.Dtos.Column (>= 3.0.5)
- Soenneker.DataTables.Dtos.ServerResponse (>= 3.0.2)
- Soenneker.DataTables.Dtos.ServerSideRequest (>= 3.0.4)
- Soenneker.Extensions.String (>= 3.0.549)
- Soenneker.Quark.Components.Cancellable (>= 3.0.4)
- Soenneker.Utils.Debounce (>= 3.0.7)
- Soenneker.Utils.Json (>= 3.0.2345)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last Updated |
---|---|---|
3.0.38 | 10 | 8/23/2025 |
3.0.37 | 18 | 8/22/2025 |
3.0.36 | 17 | 8/22/2025 |
3.0.35 | 87 | 8/21/2025 |
3.0.34 | 58 | 8/17/2025 |
3.0.33 | 71 | 8/15/2025 |
3.0.32 | 112 | 8/12/2025 |
3.0.31 | 109 | 8/12/2025 |
3.0.30 | 109 | 8/12/2025 |
3.0.29 | 110 | 8/12/2025 |
3.0.28 | 113 | 8/12/2025 |
3.0.27 | 114 | 8/12/2025 |
3.0.26 | 108 | 8/12/2025 |
3.0.25 | 114 | 8/12/2025 |
3.0.24 | 117 | 8/11/2025 |
3.0.23 | 121 | 8/11/2025 |
3.0.22 | 114 | 8/11/2025 |
3.0.21 | 190 | 8/7/2025 |
3.0.17 | 205 | 8/6/2025 |
3.0.16 | 197 | 8/6/2025 |
3.0.15 | 198 | 8/6/2025 |
3.0.14 | 198 | 8/6/2025 |
3.0.13 | 202 | 8/6/2025 |
3.0.12 | 211 | 8/6/2025 |
3.0.11 | 202 | 8/5/2025 |
3.0.10 | 207 | 8/5/2025 |
3.0.9 | 205 | 8/5/2025 |
3.0.8 | 205 | 8/5/2025 |
3.0.7 | 192 | 8/5/2025 |
3.0.6 | 186 | 8/5/2025 |
3.0.5 | 27 | 8/2/2025 |
3.0.4 | 32 | 8/1/2025 |
3.0.3 | 41 | 8/1/2025 |