Skip to content
IzzyBlazor

Enter all results ↑ ↓ move Esc close

TreeView

Since 0.1.0-alpha.21
Shows items nested in items, such as folders, as branches that open and close.

IzzyBlazor.TreeView<TItem> in the IzzyBlazor.Core package, generated from the 0.1.0-alpha.32 assembly and its doc comments.

Properties (25)

ItemsIEnumerable<TItem>?Added in 0.1.0-alpha.21

The items at the top of the tree.

ItemChildrenFunc<TItem, IEnumerable<TItem>?>?Added in 0.1.0-alpha.21

An item's children, or null or empty when it has none.

ItemKeyFunc<TItem, string>?Added in 0.1.0-alpha.21

A key that tells items apart, such as an id. Needed for selection, and for branches a person opened to stay open across pages; without it, each item's place is kept by the item itself.

ChildContentRenderFragment<TItem>?Added in 0.1.0-alpha.21

An item's content. Without it, ItemText, ItemDescription and ItemIcon draw it.

ItemTextFunc<TItem, string?>? (computed)Added in 0.1.0-alpha.21

An item's text, with no template. Defaults to the item's ToString().

ItemDescriptionFunc<TItem, string?>?Added in 0.1.0-alpha.21

A muted second line under an item's text, with no template.

ItemIconFunc<TItem, IconData?>?Added in 0.1.0-alpha.21

An icon before an item's text, with no template.

ItemLabelFunc<TItem, string>? (computed)Added in 0.1.0-alpha.21

Names an item for screen readers: the button that opens its children, and in a tree to choose from the item itself. Defaults to ItemText.

ItemHrefFunc<TItem, string?>?Added in 0.1.0-alpha.21

Makes an item a link to this address; null leaves it plain. Not with SelectionMode.

ItemCurrentFunc<TItem, bool>?Added in 0.1.0-alpha.21

Marks the item the page is showing. Its branch starts open.

ItemHasChildrenFunc<TItem, bool>?Added in 0.1.0-alpha.21

Says an item has children to load with ChildrenProvider when its branch first opens, for items whose ItemChildren is empty.

ChildrenProviderFunc<string, CancellationToken, ValueTask<IEnumerable<TItem>>>?Added in 0.1.0-alpha.21

Loads an item's children, given its key, the first time its branch opens: in the component on an interactive page, and on a static page by the script fetching the page with the key. Needs ItemKey and ItemHasChildren.

Searchablebool = falseAdded in 0.1.0-alpha.21

A search box above the tree that narrows it as you type: matches and their parents stay, their branches open. In the browser, over the items it has; with script.

SearchLabelstring? (computed)Added in 0.1.0-alpha.21

The search box's name and placeholder. Defaults to "Search" (Search).

ItemExpandedFunc<TItem, bool>?Added in 0.1.0-alpha.21

Starts an item's children open.

ItemDisabledFunc<TItem, bool>?Added in 0.1.0-alpha.21

Dims an item and takes away its link, or disables its box. Its children still open.

@bind-ExpandedItemsIReadOnlyCollection<string>?Added in 0.1.0-alpha.22 @bind: Interactive only

The keys of the items whose children are open, on an interactive page; bind it with @bind-ExpandedItems. Branches that hold the current or a selected item, or that ItemExpanded opens, start open too.

SelectionModeSelectionMode = SelectionMode.NoneAdded in 0.1.0-alpha.21

SelectionMode.Multiple gives each item a checkbox; SelectionMode.Single selects one item. Needs ItemKey.

@bind-SelectionSelection?Added in 0.1.0-alpha.21 @bind: Interactive only

The selected items' keys. Bind it with @bind-Selection.

SelectionNamestring? = selectedAdded in 0.1.0-alpha.21

The form name the selected keys post under, as {name}.Keys; read them with [SupplyParameterFromForm(Name = "...")] Selection. Defaults to selected.

ItemSelectableFunc<TItem, bool>?Added in 0.1.0-alpha.21

Whether an item can be selected; one that can't keeps its place, with its box disabled, and with script a click on it opens or closes its branch.

Cascadebool = trueAdded in 0.1.0-alpha.21

With checkboxes, checking a parent checks its branch, and a parent shows how much of its branch is checked. On by default; false makes each box its own.

Labelstring?Added in 0.1.0-alpha.22

Names the tree for screen readers, when nothing around it does. A tree to choose from needs one.

EmptyTextstring? (computed)Added in 0.1.0-alpha.21

Shown when there are no items. Defaults to "No items" (NoItems).

EmptyContentRenderFragment?Added in 0.1.0-alpha.21

Content shown when there are no items, in place of EmptyText.

Events (0)

No events.

Types (2)

Selection

class

The items selected in a Table or ListView: some keys, or every item matching a filter and search except some keys (SelectAllMode.All). Bind it with @bind-Selection, or on a static page with [SupplyParameterFromForm(FormName = "...", Name = "...")] under the view's SelectionName. For a bulk action, Apply gives the selected items from a query.

Selection members
MemberDescription
None

Nothing selected.

Of(IEnumerable<string> keys)

These keys selected.

AllOf<TItem>(DataRequest<TItem> request)
Keys string[]?

The selected keys; with All, the keys left out.

All bool = false

Every item matching Filter and Search is selected, except Keys.

Filter string?

With All, the filter it was made under, in the ?filter= form; null for none.

Search string?

With All, the search it was made under; null for none.

KeyList string?

The keys as one JSON list, as the script posts a selection kept across pages: one field rather than one per key, which stays under the server's limit of 1,024 form values. Added to Keys. For the form post, not for code.

IsEmpty bool = true

Nothing is selected.

Apply<TItem>(IQueryable<TItem> source, Expression<Func<TItem, string>> key)
Apply<TItem>(IQueryable<TItem> source, Expression<Func<TItem, string>> key, IReadOnlyList<DataField<TItem>> fields)
ApplyTree<TItem, TKey, TParent>(IQueryable<TItem> source, Expression<Func<TItem, TKey>> key, Expression<Func<TItem, TParent>> parent)
Contains(string key)

Whether the item with this key is selected (for All, among the matching items).

Count(int? total)

How many are selected, given how many match; null when All and the total isn't known.

MatchesScope(Filter? filter, string? search)

Whether All was made under this filter and search; when not, the selection no longer means the same items.

With(string key, bool selected)

A copy with this key selected or cleared.

SelectionMode

enum

How many items can be selected.

SelectionMode values
ValueDescription
None

No selection. The default.

Single

One item, with a radio button on each.

Multiple

Any number, with a checkbox on each; with script, a box to select them all (see SelectAllMode).

Connection lost

Rejoining the server…