select2-multi-checkboxes icon indicating copy to clipboard operation
select2-multi-checkboxes copied to clipboard

How to use amd branch for Select2 4.x

Open harmancode opened this issue 4 years ago • 2 comments

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.

harmancode avatar Jun 25 '21 19:06 harmancode

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

wasikuss avatar Jun 28 '21 04:06 wasikuss

It works when I use your attachment. Thank you!

harmancode avatar Jun 30 '21 16:06 harmancode