openalloc / SwiftTabler

A multi-platform SwiftUI component for tabular data
Apache License 2.0
136 stars 14 forks source link

Support alternating row background #36

Open reedes opened 2 years ago

reedes commented 2 years ago

Much like Apple's Table component supports them.

reedes commented 2 years ago

In Monterey and onward, Lists support this style with the following modifier:

TablerList(listConfig,
                           header: header,
                           row: row,
                           results: fruits)
    .listStyle(.inset(alternatesRowBackgrounds: true))

It'd be nice to support a similar effect for Stack and Grid based tables.