pub struct DataGridProps {Show 13 fields
pub label: AccessibleName,
pub columns: Vec<GridColumn>,
pub rows: ReadSignal<Vec<Vec<GridCell>>>,
pub row_headers: bool,
pub total_rows: Option<usize>,
pub first_row: usize,
pub active: CellRef,
pub anchor: Option<CellRef>,
pub editing: Option<CellRef>,
pub onedit: Option<EventHandler<GridEdit>>,
pub onselect: Option<EventHandler<CellRange>>,
pub class: Option<String>,
pub attributes: Vec<Attribute>,
}Expand description
Properties for the DataGrid component.
Fields§
§label: AccessibleName§columns: Vec<GridColumn>§rows: ReadSignal<Vec<Vec<GridCell>>>A signal, so a large sheet is shared rather than copied into each render.
row_headers: boolNumbers each row in a sticky header column.
total_rows: Option<usize>The true row count when only a window of rows is rendered, so a screen reader is told the real size.
first_row: usizeThe zero-based index of the first rendered row within total_rows.
active: CellRefThe cell active on first render.
anchor: Option<CellRef>Where the first render’s selection starts; the active cell when omitted.
editing: Option<CellRef>A cell that starts in edit mode, such as the first cell of a new row.
onedit: Option<EventHandler<GridEdit>>§onselect: Option<EventHandler<CellRange>>§class: Option<String>§attributes: Vec<Attribute>Implementations§
Source§impl DataGridProps
impl DataGridProps
Sourcepub fn builder() -> DataGridPropsBuilder<((), (), (), (), (), (), (), (), (), (), (), (), ())>
pub fn builder() -> DataGridPropsBuilder<((), (), (), (), (), (), (), (), (), (), (), (), ())>
Create a builder for building DataGridProps.
On the builder, call .label(...), .columns(...), .rows(...), .row_headers(...)(optional), .total_rows(...)(optional), .first_row(...)(optional), .active(...)(optional), .anchor(...)(optional), .editing(...)(optional), .onedit(...)(optional), .onselect(...)(optional), .class(...)(optional), .attributes(...)(optional) to set the values of the fields.
Finally, call .build() to create the instance of DataGridProps.