vedmack / yadcf

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

Select2's "tags: true" isn't supported #589

Open m417z opened 5 years ago

m417z commented 5 years ago

Select2 allows dynamic option creation by setting tags: true. Unfortunately it doesn't work well with yadcf, since the select box is re-created on each selection, and the newly created dynamic option gets removed.

For example, here's a demo: https://jsfiddle.net/zjk2a4u9/

As you can see in the gif below, inserting "i" as a new option works, but the option is not preserved and the select box becomes empty:

2019-08-01_09-30-24

vedmack commented 4 years ago

@m417z you might wanna look the following issue that was opened / resolved, maybe you can use the same technique to refresh the filter https://github.com/vedmack/yadcf/issues/602.

Or debug yadcf and try to call init on that filter like in initializeSelectPlugin function