SwiftTabler
SwiftTabler copied to clipboard
Support row-scoped context/swipe menu for Grid-based tables
Like Apple's own Table component for macOS, it's necessary to attach modifiers to each column, which can be inconvenient.
One way to do this is to support an 'item' modifier parameter, which will be applied to all items in a row.
Attempted to apply a .contextMenu modifier in GridItemMod without success.
func body(content: Content) -> some View {
content
.padding(config.itemPadding)
.contextMenu {
Button("aaa") {}
Button("bbb") {}
}
...
}
The resulting items do not layout as expected.
Works as expected in StackItemMod (in TablerDemo).