init(of:sortOrder:columnCustomization:columns:rows:)
Creates a sortable table with the given columns and rows and has dynamically customizable columns.
Declaration
nonisolated init<Sort>(of valueType: Value.Type = Value.self, sortOrder: Binding<[Sort]>, columnCustomization: Binding<TableColumnCustomization<Value>>, @TableColumnBuilder<Value, Sort> columns: () -> Columns, @TableRowBuilder<Value> rows: () -> Rows) where Sort : SortComparator, Columns.TableRowValue == Sort.ComparedParameters
- valueType:
The type of value used to derive the table’s contents.
- sortOrder:
A binding to the ordered sorting of columns.
- columnCustomization:
A binding to the state of columns.
- columns:
The columns to display in the table.
- rows:
The rows to display in the table.
Discussion
Each column in the table that should participate in customization is required to have an identifier, specified with customizationID(_:).