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

[Query] Is there a way to use Select2 instead of select out of the box? #121

Open
skills-up opened this issue Jun 17, 2019 · 1 comment
Open

Comments

@skills-up
Copy link

Hi,

After going through the example video I'm wondering if Select2 is supported, as the default template appears to use bootstrap framework.

If we can specify select2 instead of select in html-type, and it can generate corresponding select2 code in the views (with search and tags etc) then it will be great.

Thanks,
Gaurav

@MikeAlhayek
Copy link
Collaborator

I never used select2. However, I believe all you need to to create your field with a specific class. Then using js to initialize select2() instance using that class.

For example, in the resource-file, find a field where you want to use select2() and add class called “select2” to the classes attribute. Then you can active it after the page finished loading. This may be one way to initialize it using jQuery

$(function(){
     $(‘.select2’).select2();
});

I hope this helps

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

No branches or pull requests

2 participants