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

Listen for event to close any open ui-selects

Open sambomartin opened this issue 12 years ago • 3 comments

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.

sambomartin avatar Aug 12 '14 13:08 sambomartin

Can you create a plunker to check this better?

dimirc avatar Aug 14 '14 02:08 dimirc

@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??

greendad avatar May 19 '15 07:05 greendad

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

Jefiozie avatar Jan 31 '17 06:01 Jefiozie