Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
reedes opened this issue Mar 5, 2022 · 1 comment
Open

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

reedes opened this issue Mar 5, 2022 · 1 comment
Labels
enhancement New feature or request

Comments

@reedes
Copy link
Contributor

reedes commented Mar 5, 2022

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 reedes changed the title Supporting menus (and other modifiers) for Grid-based variants Support menus (and other modifiers) for Grid-based variants Mar 5, 2022
@reedes reedes added the enhancement New feature or request label Mar 6, 2022
@reedes
Copy link
Contributor Author

reedes commented Mar 8, 2022

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 reedes changed the title Support menus (and other modifiers) for Grid-based variants Support row-scoped context/swipe menu for Grid-based tables Mar 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Development

No branches or pull requests

1 participant