vedmack / yadcf

Yet Another DataTables Column Filter (yadcf)
http://yadcf-showcase.appspot.com/
MIT License
731 stars 285 forks source link

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

Closed Nonononoki closed 5 years ago

Nonononoki commented 5 years ago

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
}
vedmack commented 5 years ago

please provide a test page (jsfiddle) with latest yadcf beta in use...

Nonononoki commented 5 years ago

Couldn't find a good source for latest beta (examples are using 0.9.2 even though they say 0.9.3!) so I used 0.9.2

https://jsfiddle.net/5qc9701v/4/

vedmack commented 5 years ago

Hi

For some reason when working in that mode I can't get the selected values, you can look inside doFilterMultiSelect (place breakpoint) method the selected_values = $(arg).val(), returns only the first selection, you can check this behavior and let me know if there is a solution for this because I couldn't find one.

vedmack commented 5 years ago

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

sakibbuddy commented 5 years ago

Is there any work around to solve the issue? I have checked with select2 version: 4.0.3 and facing the same problem. Should I downgrade the version of select2?

vedmack commented 5 years ago

@sakibbuddy , the only thing I could think of is to try with 3.5.4 and try to upgrade until you will see that is stopped working, and report to select2 team

sakibbuddy commented 5 years ago

I tried with 4.0.0 and it stopped working.

vedmack commented 5 years ago

@sakibbuddy so you should contact/ask on StackOverflow for a solution

sakibbuddy commented 5 years ago

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