Method SortableContext
- Namespace
- Velvet
- Assembly
- Velvet.Docs.dll
SortableContext(IReadOnlyList<string>, DndSortingStrategy?, string?, VNode?[]?, string?)
Sorting scope, dnd-kit's SortableContext: the Sortable(string, object?, bool, DragMovement, DragActivation?, DndSortingStrategy?, string?, string?, string?, string?, string?, FiberElementProps?, StyleOverrides?, Func<VisualElement, Action>?, VNode?[]?, string?, string?, string?, IReadOnlyDictionary<string, string>?, IReadOnlyDictionary<string, string>?, FiberEventBinding[]?) items under it sort in the
order items gives. Renders no element of its own.
public static ComponentNode SortableContext(IReadOnlyList<string> items, DndSortingStrategy? strategy = null, string? id = null, VNode?[]? children = null, string? key = null)
Parameters
itemsIReadOnlyList<string>The items' ids, in their current order.
strategyDndSortingStrategyHow items move aside while a drag sorts them; null means Rect.
idstringThe context's id, as ContainerId reports it; null generates one.
childrenVNode[]The content holding the sortable items.
keystringKey used to disambiguate siblings at the same position.
Returns
- ComponentNode
The created ComponentNode.