I was playing around with TableColumn api in MacOS Ventura I have the following data model.
actor HousingData: Identifiable {
let id: Int
let rank: Int
let region: String
let regionType: RegionType
let state: String
}
However when it try to do
TableColumn("foo", value: \.rank)
I get
Key path value type 'Int' cannot be converted to contextual type 'String'
if I try
TableColumn("Rank", value: \.rank) { rank in
Text("\(rank)")
}
I get
Referencing initializer 'init(_:value:content:)' on 'TableColumn' requires the types 'Never' and 'KeyPathComparator<HousingData>' be equivalent
If i use a string value all works well.