question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Using "closeOnSelect:false" with select2 only work for the first element

See original GitHub issue

Using “closeOnSelect:false” with select2 only work for the first element, clicking any other element on the list will not update the table

select_type_options: {
        	closeOnSelect: false
}

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:9 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
vedmackcommented, Sep 5, 2019

I have checked this a bit more… it looks like a select2 issue, I tried it with older select2 version (3.5.4) and it seems to work fine, check test page https://jsfiddle.net/vedmack/4tq9ejmc/

when selecting several values (without closing it yet) call the following $("#yadcf-filter--example-0").val() , you should see the selected values, now if you will do the same with the selct2 version from your test page it won’t show the proper values, worth checking with select2 authors

0reactions
sakibbuddycommented, Sep 9, 2019

I have found one question in stackoverflow regarding this: closeOnSelect not working

Read more comments on GitHub >

github_iconTop Results From Across the Web

closeOnSelect: false not working in Select2 when using ...
In my options I have closeOnSelect: false;. Warning! I use $.fn.select2.amd.require . 'select2/dropdown/closeOnSelect' Cannot be deleted.
Read more >
when use multi-select with [closeOnSelect: false] each time ...
I use the control without infinite scrolling (my option set is fixed size), and I find it annoying that the first selected item...
Read more >
Select2 only working on first element - Is this a bug?
I am using select2 version 4.0.13 I have tried version 4.1.0 too… but the thing is it only select the first element by...
Read more >
Want select2 not to select first option by default - Google Groups
We can't control that, we can only work around it. Your best option is to use the placeholder support in Select2 and include...
Read more >
Options - Select2 - JeeSite
Default options are only used when an option is requested that has not been ... Due to a jQuery bug, nested options using...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found