I have a table as follows:
var body: some View {
Table(logs, selection: $selectedLine, sortOrder: $sortOrder) {
TableColumn("timestamp", value: \.timestamp) {
Text("\($0.timestamp.formatted(date: .abbreviated, time: .standard))")
}
TableColumn("device", value: \.level)
TableColumn("message", value: \.message)
}
.onChange(of: sortOrder) {
logs.sort(using: $0)
}
}
Right now the table defaults to splitting each of the columns equally, but I would like it to set the column to fix the size of the data within.
timestamp and device are tiny compared to message, which often needs to scroll scroll to view it all.
How can I make it so that timestamp and device will shrink, and message will grow even if it means scroll would be required? Is it even possible?