init(_:value:comparator:)
Creates a sortable column that displays a string property, and generates its label from a localized string resource.
Declaration
@export(implementation) nonisolated init(_ titleResource: LocalizedStringResource, value: KeyPath<RowValue, String>, comparator: String.StandardComparator = .localizedStandard) where Content == TextParameters
- titleResource:
Text resource for the column’s localized title.
- value:
The path to the property associated with the column, to display verbatim as text in each row of a table, and the key path used to create a sort comparator when sorting the column.
- comparator:
The
SortComparatorused to order the string values.
Discussion
This initializer creates a Text view for you. For more information about localizing strings, see Text.