Idea: Make Bootstrap Compatible
See original GitHub issueThere’s this theme https://github.com/select2/select2-bootstrap-theme
But currently not compatible with django-autocomplete-light even if I add the theme manually since I can’t apply it to the Widgets (constructor doestn’t recognize theme
param) nor do I know how to apply it as the Select2 default theme after the Select2 script is added but before the select2()
function is called.
Issue Analytics
- State:
- Created 6 years ago
- Comments:19 (10 by maintainers)
Top Results From Across the Web
New Project: Bootstrap | IntelliJ IDEA Documentation - JetBrains
The feature is supported only in the Ultimate edition when the HTML Tools plugin is installed and enabled. The HTML Tools plugin is...
Read more >CSS · Bootstrap
Bootstrap makes use of certain HTML elements and CSS properties that require the use of the HTML5 doctype. Include it at the beginning...
Read more >How to make Bootstrap responsive layout work on IE8
By suggestions, I tried adding <meta http-equiv="X-UA-Compatible" content="IE=edge" /> , respond.js or css3-mediaqueries-js , but none of them helped. Here's a ...
Read more >The Ultimate Guide to Bootstrap CSS - HubSpot Blog
Junior developer using Bootstrap CSS to create responsive website ... It's also fully customizable, and compatible with all modern browsers.
Read more >Bootstrap (front-end framework) - Wikipedia
Bootstrap is a free and open-source CSS framework directed at responsive, mobile-first front-end web development. It contains HTML, CSS and (optionally) ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@carlos22 thanks for this tip. finally got this working. Although slightly different implementation (see below). Also, for anyone else driven crazy by the height of the select box open your select2-bootstrap4.css file, and add min-height to class: .select2-container–bootstrap4 .select2-selection { min-height: 40px; }
class NewPostForm(forms.ModelForm): target = forms.ModelChoiceField( queryset=Celebrities.objects.all(), widget=autocomplete.ModelSelect2() )
This works for me (using bootstrap 4 theme from https://github.com/berkan52/select2-bootstrap4-theme)
Just add anywhere in your js (after jquery is loaded).
Oh and make sure the css file is loaded AFTER the select2.css bundeled with this package. E.g.