Skip to content

Commit

Permalink
fixed code example for sort
Browse files Browse the repository at this point in the history
  • Loading branch information
Reed Es committed Feb 28, 2022
1 parent 2191573 commit ef168b5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,11 +136,11 @@ private typealias Sort = TablerSort<Fruit>

@ViewBuilder
private func header(_ ctx: Binding<Context>) -> some View {
Sort.title("ID", ctx, \.id)
Sort.columnTitle("ID", ctx, \.id)
.onTapGesture { tablerSort(ctx, &fruits, \.id) { $0.id < $1.id } }
Sort.title("Name", ctx, \.name)
Sort.columnTitle("Name", ctx, \.name)
.onTapGesture { tablerSort(ctx, &fruits, \.name) { $0.name < $1.name } }
Sort.title("Weight", ctx, \.weight)
Sort.columnTitle("Weight", ctx, \.weight)
.onTapGesture { tablerSort(ctx, &fruits, \.weight) { $0.weight < $1.weight } }
Text("Color")
}
Expand Down

0 comments on commit ef168b5

Please sign in to comment.