Table of Contents

Interface IDataCollectionStatePersistence

Namespace
BlazOrbit.Components
Assembly
BlazOrbit.dll

Strategy for persisting DataCollectionState<TItem> across renders / reloads. The default registration is NullStatePersistence (no-op); register LocalStorageStatePersistence via AddBlazOrbitDataCollectionLocalStorage() to opt every grid in to localStorage-backed persistence, or supply a custom implementation for query string / server-side stores.

public interface IDataCollectionStatePersistence

Methods

LoadAsync(string)

Reads a previously persisted snapshot. Returns null when no payload is stored, the entry is malformed, or the underlying storage is unavailable (e.g. SSR without a JS runtime).

ValueTask<string?> LoadAsync(string key)

Parameters

key string

Returns

ValueTask<string>

SaveAsync(string, string)

Persists a JSON-shaped payload under key. Implementations swallow transient storage failures so consumers don't need to wrap each call in a try/catch.

ValueTask SaveAsync(string key, string payload)

Parameters

key string
payload string

Returns

ValueTask