Skip to content

Include SELECT2_THEME settings #101

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

Closed
codingjoe opened this issue Nov 2, 2021 Discussed in #99 · 0 comments · Fixed by #103
Closed

Include SELECT2_THEME settings #101

codingjoe opened this issue Nov 2, 2021 Discussed in #99 · 0 comments · Fixed by #103
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@codingjoe
Copy link
Owner

Discussed in #99

Originally posted by CleitonDeLima October 29, 2021
Select2 accepts themes, an example is bootstrap4.

To configure it, you need to include a new css file and add the theme option when starting select2.

<link rel="stylesheet" href="/path/to/select2.css">
<link rel="stylesheet" href="/path/to/select2-bootstrap4.min.css">
$('select').select2({
    theme: 'bootstrap4',
});

The settings could look like this:

# accept str too
SELECT2_CSS = (
    "/path/to/select2.css",
    "/path/to/select2-bootstrap4.min.css",
)
SELECT2_THEME = `"bootstrap4"`

I am willing to develop this option if it is valid.

@codingjoe codingjoe added enhancement New feature or request good first issue Good for newcomers labels Nov 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant