Skip to content
This repository was archived by the owner on May 29, 2019. It is now read-only.

ui-select inside a bootstrap dropdown menu #3989

Closed
jbonigomes opened this issue Jul 22, 2015 · 6 comments
Closed

ui-select inside a bootstrap dropdown menu #3989

jbonigomes opened this issue Jul 22, 2015 · 6 comments

Comments

@jbonigomes
Copy link

I am using ui-select inside a bootstrap dropdown menu, this menu only closes when I click outside the dropdown menu area, this is good, however, with an ui-select there, the bootstrap dropdown closes when I select a value from ui-select

@RobJacobs
Copy link
Contributor

Questions of this nature will get a better response on Stackoverflow, see the faq. You have 2 separate popup implementations fighting each other, not sure why you would want to use ui-select in a dropdown as ui-select itself is a dropdown? Closing for now, I will re-open if you feel there is an issue we can address.

@jbonigomes
Copy link
Author

Thanks @RobJacobs, but I think we may have a misunderstanding here, I have taken a screenshot of the UI to demonstrate better what is happening:

menu

The bootstrap dropdown englobes a sequence of ui-select items.

@dasrick
Copy link

dasrick commented Oct 1, 2015

Same problem here ... the selection of an item of the inner ui-select will close the outer bootstrap dropdown (ui-bootstrap dropdown with auto-close="outsideClick") ...
@jbonigomes did you find a solution/workaround/pull-request for this behavior?

outer bootstrap dropdown - inner ui-select

Screenshot: the selection of a role will close the complete dropdown ...

@icfantv
Copy link
Contributor

icfantv commented Oct 1, 2015

Without researching it further, It sounds like the issue may be with event propagation. I would encourage you guys to use the un-minified version of the UI bootstrap library and see if this is the case. However, it may boil down to what library is actually causing the issue, UI Bootstrap or UI Select.

If the latter, I'm afraid that active development on that project has appeared to stall so unless you REALLY need all the features of UI Select for that select box (find-as-you-type, tagging, etc...) I would strongly encourage the use of the native <select> element w/ ng-options. Doing this may also help discern where exactly the problem lies.

In general, it's really just a good idea to only use 3rd party libraries to provide specific functionality where you need them and not "just because you're using it elsewhere." This is what we've done at work and, like us, I think you'll find that you'll have a lot less headaches. Think of it as "using the right tool for the job."

Hope that helps and please let us know what you find. Thanks.

@mi-rsc
Copy link

mi-rsc commented Oct 15, 2015

@icfantv I have the same problem and solved it with a plain select element instead of ui-select. But it looks not so good in any browser and sometimes i need the "find-as-you-type" feature. So is there any progress in that discussion ?

@icfantv
Copy link
Contributor

icfantv commented Oct 15, 2015

@Rabbit-IQ would the typeahead widget work in this scenario?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants