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

Grid menu option "showClearAllFiltersCommand" is always displayed #10

Closed
sabeurch opened this issue Feb 1, 2018 · 4 comments
Closed

Comments

@sabeurch
Copy link
Contributor

sabeurch commented Feb 1, 2018

When I set grid menu options as follow:

this.gridOptions = {
    ....,
    gridMenu: {
        showClearAllFiltersCommand: false,
        showToggleFilterCommand: false
    }
    ....,
}

This has no effect, clear filter and toggle filter commands are alwasy displayed.

I think, it has to do with those lines of code:

options.gridMenu.showClearAllFiltersCommand = options.gridMenu.showClearAllFiltersCommand || true;
options.gridMenu.showRefreshDatasetCommand = options.gridMenu.showRefreshDatasetCommand || true;
options.gridMenu.showToggleFilterCommand = options.gridMenu.showToggleFilterCommand || true;

in file "angular-slickgrid.js", Logic of "|| true" sets values always into true.

Would you please verify ?

Note: For the moment as a workaround, we can disable those commands from option "customItems", but it keeps them displayed as disabled.

@ghiscoding
Copy link
Owner

ghiscoding commented Feb 1, 2018

I believe that I have fixed this behavior couple weeks ago, it works on my side. The code implementation is to use the custom options first (if any), and if not found it will set it to true. There are 2 commands that should be available everwhere (1 refresh command is reserved to backend services).

I tried it in the demo project and it works as expected in the Client Side example and the GraphQL example.

@sabeurch
Copy link
Contributor Author

sabeurch commented Feb 1, 2018

Yes, version 0.8.1 works fine.
Thank you !

@ghiscoding
Copy link
Owner

So we can close the issue?

@sabeurch
Copy link
Contributor Author

sabeurch commented Feb 2, 2018

Yes, please.

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