Platforms
This page lists where Klyroo.Table runs, what each render mode changes, and what is known about trimming and NativeAOT. Every statement comes from the project files and the source of this repository; where something is not verified here, the page says so.
On this page
What the packages declare
| Package | Target | IsTrimmable |
IsAotCompatible |
Supported platforms |
|---|---|---|---|---|
Klyroo. |
net11.0 |
true |
true |
any platform .NET 11 runs on |
Klyroo. |
net11.0 |
true |
not set | browser, ios, android, maccatalyst, windows |
CI builds Klyroo. with the AOT and trimming analyzers on every change. It does not publish or run anything with NativeAOT, and it does not run Klyroo. in a MAUI app.
Render modes
| Render mode | What the list does | Limits |
|---|---|---|
| Static server rendering | The server loads the list for each request. Sort, page, layout and filter controls are links that carry the new state in the address, and search, the filter panel and the page size picker are GET forms. | No checkbox column, no selection bar, no actions menu, and only the row actions that are links. No virtualization. Controls that need script (popovers) use the script of Klyroo.UI. |
| Interactive Server | Everything. State changes go through QueryState without a page load. |
A Queryable source blocks the circuit thread unless you register an asynchronous IData. |
| Interactive WebAssembly | Everything. | The list runs in the browser, so it cannot reach a database: use Items or a Provider that calls your API. |
| Interactive Auto | Everything. The first load runs in whichever render mode the page starts in. | AddKlyrooTable() must be called in the server project and in the client project, and a Provider has to work in both places. |
| .NET MAUI Blazor Hybrid | See below. | Not run by any test in this repository. |
A page that is prerendered and then becomes interactive loads its list twice unless you hand the prerendered result over, as described next.
Prerendering and the Auto render mode
A component with an interactive render mode runs once on the server for the prerender and again in the interactive runtime. For a data list that means two loads. ResultJson removes the second one: the result of the prerender is serialized into the persistent component state, and the interactive list adopts it when the state it starts from is the one the prerender loaded.
The result is written with the JsonTypeInfo you give, not by reflection, so it works with trimming. Create it from a Json that lists DataListResult for your row type:
using System.Text.Json.Serialization;
using Klyroo.Query;
public sealed record Order(int Id, string Customer, string Country, decimal Total);
public static class OrderSchema
{
public static readonly DataListSchema<Order> Schema = DataListSchema.For<Order>(s => s
.RowKey(o => o.Id)
.Search(o => o.Customer, o => o.Country)
.Field(o => o.Customer, f => f.Sortable())
.Field(o => o.Total, f => f.Sortable()));
}
[JsonSerializable(typeof(DataListResult<Order>))]
public sealed partial class OrderJson : JsonSerializerContext;@page "/orders/auto"
@rendermode InteractiveAuto
@inject HttpClient Http
<KlyDataList TItem="Order" Schema="OrderSchema.Schema" Provider="LoadAsync"
ResultJson="OrderJson.Default.DataListResultOrder" UrlKey="orders" Label="Orders" />
@code {
private async ValueTask<DataListResult<Order>> LoadAsync(DataListRequest request, CancellationToken cancellationToken)
{
using var response = await Http.PostAsJsonAsync("api/orders/query", request, DataListJsonContext.Default.DataListRequest, cancellationToken);
response.EnsureSuccessStatusCode();
var result = await response.Content.ReadFromJsonAsync(OrderJson.Default.DataListResultOrder, cancellationToken);
return result ?? new DataListResult<Order>([], 0, null, null);
}
}Three rules apply:
- Lists that persist need distinct
UrlKeyorPersistKeyvalues. Two lists of the same row type under the same key throw when the second one initializes. - The persisted result is small on purpose. The browser sends everything persisted back to the server when a Server circuit starts, and SignalR refuses messages past 32 KB. Sizes are counted as sent, with the escaping and the two base64 encodings Blazor adds, so the JSON itself is about a third of them. One list persists at most 24 KB (
PersistMaxBytes), and all the Klyroo libraries of the page share 28 KB (KlyrooOptions., which Klyroo.Dashboard resources also draw from). A list over its limit, or one that no longer fits, is not persisted: the interactive render loads it again once and a warning names the list and its size. Use a smaller first page, or raise the limits together with thePersisted State Max Bytes Maximumof the hub.Receive Message Size - The provider runs on the server for the prerender and in the browser afterwards, so it must work in both. An HTTP call to your own API does, with a base address on the server
HttpClienttoo. A call to a service that exists only on the server does not.
Time zone and cookies on the server
A day filter means a day in the time zone of the user, and the request carries that zone. An interactive list asks the browser. A static render or a prerender has no browser, so it reads the klyroo-timezone cookie that the browser script sets on the first visit. The cookie is reachable through IKly, which the Klyroo. package implements:
using Klyroo.UI.Server;
builder.Services.AddKlyrooServer();Without it, a server-rendered list cuts days in UTC until the page is interactive, and logs one warning in Development. The same service lets a static render or a prerender read the column preferences cookie, so a list with a PreferencesKey paints the user's columns on the first paint. In WebAssembly and in a MAUI web view nothing implements IKly, and the zone comes from the browser engine once the list is interactive.
.NET MAUI Blazor Hybrid
Klyroo. declares ios, android, maccatalyst and windows next to browser as supported platforms, so a MAUI project that references it gets no platform compatibility warning from the package. Register it with builder. in MauiProgram..
What the source says about the web view:
- Column preferences (
PreferencesKey) are stored inlocalStorageof the web view, because there is no server to read a cookie. - Remembered filters (
DataListFilter.) are stored inWithPersist() localStoragetoo, in the web view as in a browser, through theklyroo-table-storage.module of the package.js - The CSV export (
KlyData) downloads through a browser module (List Export klyroo-table-download.), which a web view may not turn into a saved file. In a MAUI app handlejs OnExport: it receives the finished file (DatawithList Export Result ContentandToBytes(); the byte order mark is part of both unless you turned it off), and you save it with the platform's file picker or share sheet. - Nothing implements
IKlythere, so the time zone for date filters comes from the browser engine once the list is interactive.Request Cookies
The stylesheet setup of Getting started applies to the project that holds the Razor pages; the build-time Tailwind of Klyroo.UI serves its output to any host that references that project, a MAUI Blazor Hybrid app included.
What this repository does not contain: a MAUI app that uses the list, or a test that runs it in a web view. If you hit a platform-specific problem, please report it with the platform and the version.
Native C# MAUI without a web view
For a MAUI app that does not use a BlazorWebView, install Klyroo. alone if you want to bind your own view models to DataListTree and Data.
The repository also includes Klyroo. (src/): native .NET MAUI data list controls (KlyDataList, table and card layouts, search, filters, sorting, paging, selection, actions and CSV export) over Klyroo. and Klyroo., drawn with the design tokens of Klyroo. and no WebView. It requires the MAUI workload and a sibling checkout of klyroo-ui, and is built and unit-tested by ..
NativeAOT and trimming
Klyroo. sets IsAotCompatible and IsTrimmable, builds with warnings as errors, and CI runs it through the AOT and trimming analyzers. Its only dependency is Klyroo., which the Klyroo.Query repository declares the same way. A NativeAOT publish of an app that uses it is not part of CI.
Klyroo. sets IsTrimmable but not IsAotCompatible. What the source shows:
- A
KlyData(the one with aList Column Propertyexpression) is compiled to a delegate withExpression.at render time, and the in-memory executor of Klyroo.Query builds and compiles its predicates from expressions. Check an AOT or WebAssembly AOT publish before relying on either.Compile() - The prerendered result is serialized with the
JsonTypeInfoyou pass inResultJsonand with the source-generatedDataof Klyroo.Query, so that part needs no reflection. Two internal call sites suppress the trimming warningList Json Context IL2026for the string-onlyPersistentcalls, with a justification in the code.Component State - Components reach the browser through a JavaScript initializer (
Klyroo.) that Blazor loads on its own; nothing to register.Table. lib. module. js
If you need NativeAOT for the UI, test your publish: nothing in this repository claims it for Klyroo..