Skip to main content

selected_rows

Function selected_rows 

Source
pub fn selected_rows<T: Clone + 'static, K>(
    model: &impl Model<Data = T>,
    key: impl Fn(&T) -> K,
    flag: impl Fn(&T) -> bool,
) -> Vec<K>
Expand description

Collect a key for every row the model currently shows as selected.

The rows are a complete record of the selection, so this is how a host with no separate selection store reads the current set before resolving a gesture against it. Results come back in row order — the rows do not remember the order the selection was built in.