Select2 with X-Editable

Has someone got this combination to work with ajax-data and multiple set to true?

I think the documentation in X-Editable is somewhat deprecated, it uses for example initSelection() function in the example. But in any case I can’t figure out how to make this work. I can fill the initial by setting the value to the element but when I click the field, this value disappears. And even though it looks like I’m returning the right value from search function I get “no values found” in the FE.

I had this stuff working without X-Editable but looks like I can’t figure out what I need to change to integrate them into this component.

I’ll post my code if someone thinks it could help.