Initializer

init(selection:sortOrder:columns:rows:)

Creates a sortable table with the given columns and rows that supports selecting zero or one row.

Declaration 宣言

init<Sort>(selection: Binding<Value.ID?>, sortOrder: Binding<[Sort]>, columns: () -> Columns, rows: () -> Rows) where Sort : SortComparator, Columns.TableRowValue == Sort.Compared
Available when Value is Rows.TableRowValue, Rows conforms to TableRowContent, Columns conforms to TableColumnContent, and Rows.TableRowValue is Columns.TableRowValue.

Parameters パラメータ

selection

A binding to the optional selected row id.

sortOrder

A binding to the ordered sorting of columns.

columns

The columns to display in the table.

rows

The rows to display in the table.

See Also 参照

Creating a Sortable Table from Columns and Rows