Popover open and close events/callbacks
Hi,
I have a dynamic data grid that updates periodically with fresh data.
When the cells are clicked then we display some options in a popover.
We re-render the entire grid on an update which then closes the popover if open.
I can add a persistence layer to say if the user has opened a popover then keep it open but I see no event hooks to tell if a popover has been opened or closed.
I use $scope.$watch in my directive's link function to look for the amount of child nodes present, which tells me if a popover is open. But with autoclose set to true i cannot see where i can listen for when the popover is closed or not.
Lack a trigger onHide,...
Into $modal.hide, we can add the trigger, and use the options to set the callback.
In my case I need a trigger to block the aside close.
Something like:
onHiding = function() { //false not hide return value === 'rule'; }
Try using
$scope.$on('tooltip.show', ...)
Popover uses tooltip internally, so you should have the tooltip events available:
- tooltip.show.before
- tooltip.show
- tooltip.hide.before
- tooltip.hide
Thanks. That's exactly what i needed.
Thanks, works for me too. Example blocking aside:
$scope.$on('aside.hide.before', function (e) { if (block_aside_close) e.preventDefault(); }
I was checked this at yesterday, but it was not worked for me. (I wanted to use aside.hide.before)
- the scope was same in the opener and watcher function
- I have not found any code about this in the source (but I could miss)
Thx for help!
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.