TreeSelect
Since 0.1.0-alpha.22IzzyBlazor.TreeSelect<TValue, TItem> in the IzzyBlazor.Core package, generated from the 0.1.0-alpha.31 assembly
and its doc comments.
Properties (21)
ItemValueFunc<TItem, TValue>? requiredThe value an item stands for, which is bound and posted, such as its id.
ValueTextFunc<TValue, string>? (computed)Names the chosen value when its item isn't in the tree yet: in a branch still to load (ChildrenProvider). Defaults to the value's string form.
ItemsIEnumerable<TItem>?The items at the top of the tree.
ItemChildrenFunc<TItem, IEnumerable<TItem>?>?An item's children, or null or empty when it has none.
ItemTextFunc<TItem, string?>? (computed)An item's text in the tree and in the field once chosen. Defaults to the item's ToString(). Where two items share a name (Sales under two regions), return a path such as "West / Sales".
ItemDescriptionFunc<TItem, string?>?A muted second line under an item's text in the tree.
ItemIconFunc<TItem, IconData?>?An icon before an item's text in the tree.
ItemTemplateRenderFragment<TItem>?Markup for each item in the tree, in place of its text, description and icon. The field shows ItemText.
ItemExpandedFunc<TItem, bool>?Starts an item's children open. Branches that hold a chosen item start open anyway.
ItemDisabledFunc<TItem, bool>?Dims an item and stops it being chosen. Its children still open.
ItemSelectableFunc<TItem, bool>?Whether an item can be chosen; one that can't is a label for its branch, and with IzzyBlazor's script a click on it opens or closes the branch. Every item can be chosen by default; c => c.Children.Count == 0 allows only the ends of branches.
Searchablebool = falseA search box at the top of the panel that narrows the tree as you type: matches and their parents stay, their branches open. In the browser, with IzzyBlazor's script.
SearchLabelstring? (computed)The search box's name and placeholder. Defaults to "Search" (Search).
ItemHasChildrenFunc<TItem, bool>?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>>>?Loads an item's children, given its key (its value's string form), the first time its branch opens: in the component on interactive pages, and on static pages by the script fetching the page with the key. Needs ItemHasChildren. A chosen value whose item hasn't loaded is named by ValueText.
Placeholderstring?Text in the field while nothing is chosen, such as "Choose a category".
EmptyTextstring? (computed)Shown in the panel when there are no items. Defaults to "No items" (NoItems).
Clearablebool = falseA button in the field that empties it, for a value that can be empty, there while one is chosen. Off by default.
ReadOnlybool = falseMakes the field read-only: the chosen text shows in a read-only text field, and the value still posts.
@bind-ValueTValueThe value, bound with @bind-Value.
DisplayNamestring?The field's name in validation messages from the input itself, such as a value that can't be parsed.
Events (0)
No events.