Skip to main content

list_try_reorder

Function list_try_reorder 

Source
pub fn list_try_reorder(
    node: RNode,
    from: usize,
    to: usize,
) -> Result<usize, &'static str>
Expand description

Programmatically reorder a list row through the same guard → commit path a native drag takes (docs/list.md): consult the piece’s guard (which may retarget), rotate the snapshot, defer the app’s on_reorder, and tell the native host to re-query. This is how the dayscript reorder step and the mock probe drive reordering without a native gesture. Returns the index the row actually landed at. Call with no borrow held.

Day API ↩ Guides· daybrite.dev