ui-grid icon indicating copy to clipboard operation
ui-grid copied to clipboard

Adding custom item in grid menu related issue

Open vaibhavgarg90 opened this issue 10 years ago • 5 comments

Please make sure each of the following is true before submitting a new issue. We are a small team with limited time and it is very difficult to manage issues if they aren't reported correctly.

  • [x] This is a bug report, not a question on how to use the grid.
    Use Stack Overflow or Gitter for questions.
  • [x] You have searched the open issues to see if this bug has been filed before. We don't want duplicate issues.
  • [x] You have reviewed the tutorials and documentation to ensure you are using the grid correctly. ui-grid.info
  • [x] You are using the latest version of the grid. Older versions are not patched or supported.
  • [x] You have provided steps to recreate your bug. A plunkr is even better.

vaibhavgarg90 avatar Jun 14 '16 05:06 vaibhavgarg90

The custom menu item addition is simple as explained in ui-grid tutorial (http://ui-grid.info/docs/#/tutorial/121_grid_menu). The problem is that if you click on any column in the menu (to toggle visibility of that column), focus on custom item gets set for some reason. This issue is negligible if there are small number of columns. However, if there are large no. of columns in the grid, the grid menu has a scrollbar. If you scroll down and click on a column name in the menu, the scroll moves to top. It is really very irritating since you have to scroll back down to reach the previous column position in the menu. I observed that the focus on custom item gets set even if you click on an existing item in the menu. Are these issues somehow related? Any fix for this issue?

vaibhavgarg90 avatar Jun 14 '16 05:06 vaibhavgarg90

Yes i have seen the same. In case we remove the timeout the grid menu list items does not change the scroll, but the custom functions are not rendered too. I saw somewhere $scope.gridApi.restoreState (). Will have to use this and check the issue persists or not.

SuprasannaBhaumik avatar Aug 02 '16 15:08 SuprasannaBhaumik

I am unable to reproduce this locally, can you provide a plunker to show it?

dlgski avatar Aug 03 '16 13:08 dlgski

Hi, i think this is the same problem like yours. Please check this https://github.com/angular-ui/ui-grid/issues/4623#issuecomment-236995697

Wahap avatar Aug 04 '16 09:08 Wahap

Fix : angular-ui/ui-grid#4623

mportuga avatar Apr 19 '18 18:04 mportuga