Possible bug in grid menu of ui-grid when enableFiltering: true

Today, I noticed that when I have a bunch of columns and I’m enabling filtering option of ui-grid (v3.0.7), the gridMenu itself scrolls to top while clicking on an individual option in the menu. Please find plunker below:


I tried to find the possible fix on google and I got there is an open issue# 4623 on Github. Here I find out the temporary solution given by :@ChrisWiGit !!

He suggested that in function itemAction below code is responsible:

* XXX: Fix after column refactor
* Ideally the focus would remain on the item.
* However, since there are two menu items that have their 'show' property toggled instead. This is a quick fix.
gridUtil.focus.bySelector(angular.element(gridUtil.closestElm($elm, ".ui-grid-menu-items")), 'button[type=button]', true);

Please comment above line in you ui-grid.js and add below one to fix the scrolling issue.


I’m using @ChrisWiGit’s fix and it works perfectly. Once again please note that I have tested this on ui-grid v3.0.7. Hopefully this will be merged into future releases. Thank you very much !!!!


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s