DropZoneGroup
Since 0.1.0-alpha.20IzzyBlazor.DropZoneGroup<TItem> in the IzzyBlazor.Core package, generated from the 0.1.0-alpha.20 assembly
and its doc comments.
Properties (7)
@bind-ItemsIEnumerable<TItem>? requiredEvery item, in every zone; each zone shows its own in this order.
ItemKeyFunc<TItem, string>? requiredEach item's key: what posts and what keeps its elements when it moves.
ZoneOfFunc<TItem, string>? requiredThe zone an item is in, matching a ListView's Zone, such as t => t.Status. An item whose zone no ListView has isn't shown.
Namestring?On a static page, the prefix of the fields the zones post: {Name}.Keys, {Name}.Zones and {Name}.Move, bound as a ListOrder. Without it, a static page shows no handles.
OrderListOrder?On a static page, what the form posted: the zones show the posted order and zones with the move applied, and focus the moved item's handle (or ⋯ button).
SubmitOnMovebool = falseOn a static page with script, posts the form after each move, for pages that save every move. Otherwise moves stay in the page until the form is submitted. With JavaScript off, each move from an item's menu posts anyway.
ChildContentRenderFragment?The layout: the zones (ListViews with a Zone) in a Grid, a Stack or Cards.
Events (1)
Types (2)
ListMoveEventArgs
classA move in a reorderable ListView or between drop zones, before the list changes.
| Member | Description |
|---|---|
Item TItem | The item that moves. |
Key string | Its key. |
FromIndex int = 0 | Its place before the move, from 0, among the items of its zone (or the list). |
ToIndex int = 0 | Its place after the move, from 0, among the items of the zone it moves to (or the list). |
FromZone string? | The zone it moves from; null outside a |
ToZone string? | The zone it moves to; null outside a |
Cancel bool = false | Set to keep the item where it was, such as when saving the move failed. |
ListOrder
classWhat a reorderable ListView or a DropZoneGroup posts on a static page: its keys in the order shown (and in a group each item's zone), and the move a menu asked for. Bind it with [SupplyParameterFromForm(FormName = "...", Name = "...")] under the list's (or group's) Name, pass it back as Order so it shows the new order, and save Arrange (or, for zones, Arrange) when the post is the form's own submit (Move is null).
| Member | Description |
|---|---|
Keys string[]? | The items' keys, in the order the list showed them (after any moves made with script). |
Zones string[]? | In a group of zones, each item's zone, in the same order as |
Move string? | The move a handle's menu posted, such as |
Arrange<TItem>(IReadOnlyList<TItem> items, Func<TItem, string> key) | |
Arrange<TItem>(IReadOnlyList<TItem> items, Func<TItem, string> key, Func<TItem, string> zoneOf) | |
ZoneOf(string key) | The zone the post put an item in (its posted zone, or the move's), or null when the post didn't name it. |