Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

X-Editable and select2 #1172

Open
Makistos opened this issue Jan 2, 2021 · 2 comments
Open

X-Editable and select2 #1172

Makistos opened this issue Jan 2, 2021 · 2 comments

Comments

@Makistos
Copy link

Makistos commented Jan 2, 2021

I seem unable to get X-Editable to work nicely with select2. I can get X-Editable to work with other fields and select2 works on its own, but combining them seems cumbersome. Examples don't seem to work and include things that have been deprecated in select2 a long time ago (initSelection).

At least some of the issues I have:

  1. I can get an initial value to the field but when I click it the field empties. So I
  2. I can't figure out what my (Flask) backend is supposed to return because it seems no matter what I return component keeps telling nothing is found. I have verified my backend function does indeed return something but apparently in the wrong format. I've tried several different options.
  3. Default width of the component is 30px for some reason, only way I could figure how to fix this is by adding this as a parameter. This is ugly and not needed when using select2 alone.
  4. Save function is never seems to be called after I click the submit button.
  5. Are there any examples on how to use select2 with the multiple choice option (again, what format should I use?) and tags = true? Should the latter work like with how select2 normally does, i.e. with the createTag callback?
@mkamensky
Copy link

I use it with the 3.5.4 version of select2. It seems that it broke when passing to version 4

@xxl4
Copy link

xxl4 commented Jul 9, 2023

image

image

This code is work for my online project, Laravel Admin

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants