2

I am using datatables width yadcf and select2 with the multi_select option.

I want to passtrough the option closeOnSelect: false to select2. The result doesn´t work like expected: Only the first selected value gets filtered. The other entries are only highlighted.

The goal is to select multiple entries at once like in the third select box.

I made a fiddle: https://jsfiddle.net/u5xp36gz/1/

berndy2001
  • 64
  • 6

1 Answers1

0

There was an issue opened regarding this in yadcf git repo mentioned below:
Using "closeOnSelect:false" with select2 only work for the first element

According to their comment, the problem is due to the select2 version. They checked with the version select2 version (3.5.4) and its working fine.

In my case I have checked with the select2 version 3.5.4, the closeOnSelect:false is working fine, though there are some design issue.

Here how I used the option:

    yadcf.init(myTable, [
                    {column_number : 0,
                        select_type: 'select2',
                        filter_container_id: "id_of_inputField",
                        filter_type: "multi_select",
                        filter_match_mode: "exact",
                        select_type_options: {
                            width: '100%',
                            closeOnSelect : false,
                        }}
])