init(_:children:columnCustomization:columns:)
Creates a hierarchical table that computes its rows based on a collection of identifiable data and key path to the children of that data.
Declaration
nonisolated init<Data>(_ data: Data, children: KeyPath<Value, Data?>, columnCustomization: Binding<TableColumnCustomization<Value>>? = nil, @TableColumnBuilder<Value, Never> columns: () -> Columns) where Rows == TableOutlineGroupContent<Data>, Data : RandomAccessCollection, Columns.TableRowValue == Data.ElementParameters
- data:
The identifiable data for computing the table rows.
- children:
A key path to a property whose non-
nilvalue gives the children ofdata, and whosenilvalue represents a leaf row of the hierarchy, which is not capable of having children. - columnCustomization:
A binding to the state of columns.
- columns:
The columns 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(_:).