Class EntityListViewBase<T>
Shared scaffolding and command features for list tables (EntityListView<T>) or stacks (EntityListViews<T>).
public abstract class EntityListViewBase<T> : ComponentBase, IComponent, IHandleEvent, IHandleAfterRender where T : IEntity<T>
Type Parameters
T
- Inheritance
-
EntityListViewBase<T>
- Implements
- Derived
- Inherited Members
Fields
_Columns
protected IReadOnlyList<ColumnModel> _Columns
Field Value
_IncludedRelationships
protected HashSet<RelationshipPath> _IncludedRelationships
Field Value
_Ordering
protected IReadOnlyList<ListOrdering> _Ordering
Field Value
_Virtualize
The markup's Virtualize<TItem>, captured for pushed-update refreshes.
protected Virtualize<BindingResult<T>>? _Virtualize
Field Value
Properties
AllowDirtyReads
Loads entity data without a transaction.
[Parameter]
public bool AllowDirtyReads { get; set; }
Property Value
Count
Item count for Query, if the caller already knows it. Fetched automatically otherwise.
[Parameter]
public int? Count { get; set; }
Property Value
- int?
Logger
protected ILogger Logger { get; }
Property Value
LoggerFactory
[Inject]
protected ILoggerFactory LoggerFactory { get; set; }
Property Value
Options
[Inject]
protected Options Options { get; set; }
Property Value
Query
The entities to list.
[Parameter]
[EditorRequired]
public required IEntityQuery<T> Query { get; set; }
Property Value
- IEntityQuery<T>
Services
[Inject]
protected IServices Services { get; set; }
Property Value
Type
Type of the entities to list. See IListSpec to customise the generated columns.
[Parameter]
[EditorRequired]
public required IEntityInfo Type { get; set; }
Property Value
Methods
GetCommands(ICommandContext)
protected IEnumerable<Command> GetCommands(ICommandContext context)
Parameters
contextICommandContext
Returns
GetRowClass(Message?)
protected string GetRowClass(Message? message)
Parameters
messageMessage?
Returns
GetRowCommands(ICommandContext, T)
protected IEnumerable<Command> GetRowCommands(ICommandContext context, T rowValue)
Parameters
contextICommandContextrowValueT
Returns
GetRowMessage(T)
The scaffolded status message for a row, or null for the default (untinted) presentation.
protected Message? GetRowMessage(T rowValue)
Parameters
rowValueT
Returns
OnColumnsExtracted()
Hook that runs once, immediately after the column set has been extracted.
protected virtual void OnColumnsExtracted()
OnListParametersSet()
Hook that runs on every parameter set, before the column set is ensured.
protected virtual void OnListParametersSet()
OnParametersSet()
Method invoked when the component has received parameters from its parent in the render tree, and the incoming values have been assigned to properties.
protected override void OnParametersSet()
OnQueryUpdated()
Handles OnUpdated by refetching the pager's rows from the updated cache.
protected Task OnQueryUpdated()