Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Select2, modal, multiple keeps loading #5333

Closed
mati950708 opened this issue Jul 21, 2018 · 1 comment · Fixed by #5581
Closed

Select2, modal, multiple keeps loading #5333

mati950708 opened this issue Jul 21, 2018 · 1 comment · Fixed by #5581

Comments

@mati950708
Copy link

mati950708 commented Jul 21, 2018

I know that there already is an issue of this and that it´s already solve, but I just CAN´T find it anymore... The issue is that when I use select2 in a multiple, except for the first one, the rest keep loading forever... I know that there is a way of solving it changing something in the vendor? or somewhere but I just can´t find the subject... not even remember if that subject was here thought... And really need it... There may be a new solution, it´s really been a long time since I last found something like that...
The next image shows how it is with the Estado value
1

And this one shows how is expected... I already tried copy/paste a good part of my previous project but it didin´t work XD With the Order information
2

@pedrofurtado
Copy link
Contributor

send us a jsfiddle example code, describing the scenario. it is much more easy to really understand and provide some solution. reopen when ready

kevin-brown added a commit that referenced this issue Jul 21, 2019
There was a bug where the `maximumSelectionLength` option would not
kick in if the `closeOnSelect` option was enabled. Normally, this
was enabled by someone in their global configuration, but it could
also be seen when somoene selected an option while holding the
meta/ctrl/alt keys. This would implicitly enable the `closeOnSelect`
behaviour, even when it was not globally enabled, and cause the bug.

This fixes that issue by listening to the `select` event which is
triggered whenever an option is selected, and triggers the "maximum
selected" message based on that event. This should now force the
message to be displayed, even when the results did not have to be
queried another time.

Fixes #3514
Fixes #3860
Closes #5333
kevin-brown added a commit that referenced this issue Jul 21, 2019
* Rewrote maximumSelectionLength tests to use container

These brings the tests in line with other tests which we have, and
makes it easier to understand what is actually going on in the tests.

This also removes a redundant set of tests where we were testing with
=> 2 options being allowed. There are no current edge cases that would
have required this.

* Fix maximumSelectionLength being ignored by closeOnSelect

There was a bug where the `maximumSelectionLength` option would not
kick in if the `closeOnSelect` option was enabled. Normally, this
was enabled by someone in their global configuration, but it could
also be seen when somoene selected an option while holding the
meta/ctrl/alt keys. This would implicitly enable the `closeOnSelect`
behaviour, even when it was not globally enabled, and cause the bug.

This fixes that issue by listening to the `select` event which is
triggered whenever an option is selected, and triggers the "maximum
selected" message based on that event. This should now force the
message to be displayed, even when the results did not have to be
queried another time.

Fixes #3514
Fixes #3860
Closes #5333
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants