Skip to main content

table_virtualized_copyable

Function table_virtualized_copyable 

Source
pub fn table_virtualized_copyable<H: UiHost, TData, IHeader, TH, ICell, TC>(
    cx: &mut ElementContext<'_, H>,
    data: &[TData],
    columns: &[ColumnDef<TData>],
    state: impl IntoTableStateModel,
    vertical_scroll: &VirtualListScrollHandle,
    items_revision: u64,
    row_key_at: &dyn Fn(&TData, usize) -> RowKey,
    typeahead_label_at: Option<Arc<dyn Fn(&TData, usize) -> Arc<str> + Send + Sync>>,
    props: TableViewProps,
    copy_text_at: Arc<dyn Fn(&ModelStore, usize) -> Option<String> + Send + Sync>,
    on_row_activate: impl Fn(&Row<'_, TData>) -> Option<CommandId>,
    render_header_cell: impl FnMut(&mut ElementContext<'_, H>, &ColumnDef<TData>, Option<bool>) -> IHeader,
    render_cell: impl FnMut(&mut ElementContext<'_, H>, &Row<'_, TData>, &ColumnDef<TData>) -> ICell,
    output: Option<Model<TableViewOutput>>,
    debug_ids: TableDebugIds,
) -> AnyElement
where IHeader: IntoIterator<Item = TH>, TH: IntoUiElement<H>, ICell: IntoIterator<Item = TC>, TC: IntoUiElement<H>,
Expand description

Virtualized table helper that participates in cross-surface clipboard commands (edit.copy).

copy_text_at receives the data index for the selected/active leaf row.