init(_:value:comparator:content:)
Creates a sortable column that generates its label from a localized string resource.
Declaration
@export(implementation) nonisolated init(_ titleResource: LocalizedStringResource, value: KeyPath<RowValue, String>, comparator: String.StandardComparator = .localizedStandard, @ContentBuilder content: @escaping (RowValue) -> Content)Parameters
- value:
The path to the property associated with the column, used to update the table’s sorting state.
- comparator:
The specific comparator to compare string values.
- content:
The view content to display for each row in a table.
Discussion
This initializer creates a Text view on your behalf. See Text for more information about localizing strings.