SwiftTabler icon indicating copy to clipboard operation
SwiftTabler copied to clipboard

Support row-scoped context/swipe menu for Grid-based tables

Open reedes opened this issue 3 years ago • 1 comments

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.

reedes avatar Mar 05 '22 04:03 reedes

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).

reedes avatar Mar 08 '22 03:03 reedes