Listen for event to close any open ui-selects
I've had a case where I needed to add ui-select to a bootstrap popup. To prevent the select closing on a client click of the popup, I prevented the event bubbling to document.
The ui-select listens of non-client area click on the document to close it. I've needed to manually invoke this from a parent angular controller by $broadcast
Then handled in ui-select e.g.
$scope.$on('ui-select-close', function (e) {
ctrl.close();
});
If there's a better way of doing this then please advise. This (or similar) method means I can close any open ui-selects from parent scope when displayed within a bootstrap popup that prevented from closing.
Can you create a plunker to check this better?
@sambomartin Hey, I have similar case where I have ui selects inside a drop-down. And I am facing similar issues. Can you please attach a plunkr??
As this issue is open for a long time I believe it is best to close it. If needed somebody can reopen it or make a new one with the latest version of ui-select.
thanks