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

How to use amd branch for Select2 4.x #33

Open
harmancode opened this issue Jun 25, 2021 · 2 comments
Open

How to use amd branch for Select2 4.x #33

harmancode opened this issue Jun 25, 2021 · 2 comments

Comments

@harmancode
Copy link

Can somebody please explain how to use this plugin in a project using Select2 4.x?

I am trying to understand how to use the amd branch by reading the example code but I can't be sure about how to do it.

Is there any other file I need to use other than select2.multi-checkboxes.js? Where should I put dropdown.js, result.js and selection.js files and how should I import them in the project?

A short explanation can be a great help.

Thank you.

@wasikuss
Copy link
Owner

wasikuss commented Jun 28, 2021

Actually, I provided 2 examples. One for native AMD system (RequireJS) where sources are as they are and second simpler for Select2. Latter uses bundled sources to be easier to import to existing projects, but I forgot to try to create a third example where sources are not bundled and used by AMD loader from Select2. I'll check soon and create that example if it would work seamlessly. Probably the bundled one would be enough for you, so I will create a release with it.

//edit:
see attachment
select2.multi-checkboxes.js.zip

@harmancode
Copy link
Author

It works when I use your attachment. Thank you!

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

2 participants