External ui-grid-menu-button
Asked Answered
D

1

6

I want to separate ui-grid-menu-button from the ui-grid-menu. So my select column buttons will be in another place. I tried to put a watch on the toggleMenu function and in a click on my button it should trigger and should open the list. I also tried to use the broadcast option but it's not working.

What is the best way to do it?

Dutchman answered 27/10, 2014 at 15:0 Comment(2)
What did not work when you tried the watch and broadcast button? What was the expected outcome? What have you tried to do with CSS? Can you post an example of your code?Chuckwalla
If you are broadcasting from the parent scope to the ui-grid's scope (the child), you would need an $on in the child scope to catch the broadcast and trigger toggleMenu(). I don't see how a watch would work since it would only be fired once the ui-grid-menu-button within the ui-grid's scope is clicked. If all you are looking for is a super hacky way to get it to work (not recommended unless this is something that will never go into production) $scope.$$childHead.grid.gridMenuScope.toggleMenu(); codepen.io/anon/pen/ZLgjXoStrudel
C
0

I answered the same question here. Thanks @pilar1347 for the tip, my solution is a bit less hacky.

Chose answered 28/6, 2017 at 13:24 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.