Using select2-plugin together with scrollY-option causes cloned drop down

Using select2-plugin together with scrollY-option causes cloned drop down

gSibingergSibinger Posts: 10Questions: 4Answers: 0
edited July 2019 in Free community support

Hi!

I am using select2 for a multiselect drop down column filter. When I also activate the scrollY-option to enable fixed headers, the entire select2-instance gets cloned from the scroll head into the scroll body's hidden header, which leads to some unwanted behavior.

I made a fiddle for the issue here:
http://jsfiddle.net/gSibinger/xe80p7cu/55/
The cloning happens when initializing select2 on line 130.

My current workaround is to remove all clones on every table update, but that's a bit of a hack. Any suggestions on how to implement the plugin together with scrollY properly, so it won't be cloned?

Regards,
Georg

This question has an accepted answers - jump to answer

Answers

  • allanallan Posts: 61,650Questions: 1Answers: 10,094 Site admin
    Answer ✓

    I'm afraid that there isn't a good way to do this - scrollY adds all sorts of complications due to its splitting up of the DataTable.

    The way you have is probably as good as it gets at the moment.

    Allan

This discussion has been closed.