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

Context menu shows divider when items are hidden #518

Closed
TomTirapani opened this issue Aug 9, 2018 · 1 comment
Closed

Context menu shows divider when items are hidden #518

TomTirapani opened this issue Aug 9, 2018 · 1 comment
Assignees

Comments

@TomTirapani
Copy link
Member

context menu divider

@TomTirapani
Copy link
Member Author

Pull request for fix here: #519

We already had code in place to filter out consecutive dividers and filter out starting / ending dividers. However, both filtering steps were happening in the same pass over the array. This meant if there were consecutive ending dividers, one would remain.

See the defaultContextMenuItems here: https://github.com/exhi/hoist-react/blob/develop/desktop/cmp/grid/GridModel.js#L40. You can see how a grid with neither export nor column chooser would end up with 2 consecutive ending dividers.

In the pull request, I split these filters into 2 different passes. Now starting / ending dividers are filtered out after any other mutations.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants