Comments (1)
After several manual trial and error methods, I found an easy way to fix this issue by just commenting out the theme:'bootstrap5'
attribute and using the default theme of select2.
After that, I made some changes to the CSS to fit it into my project. Now my select2 script looks like below:
<script>
$('.selectsearch').select2({
// theme: 'bootstrap5',
dropdownParent: $('.filter-form'),
placeholder: 'Select an option',
templateResult: function (item) {
if (item.loading) {
return item.text;
}
var term = query.term || '';
var $result = markMatch(item.text, term);
return $result;
},
language: {
searching: function (params) {
query = params;
return 'Searching...';
}
},
cache: true,
});
</script>
Anyhow I didn't get why, the setting theme:'bootstrap5'
did not throw me any exception or error if it does not exist, then why its not taking default theme settings automatically.
from select2.
Related Issues (20)
- DataTables warning: table id=DataTables_Table_4 - Invalid JSON response. For more information about this error, please see http://datatables.net/tn/1
- automatic dropdownParent HOT 1
- troubleshooting page mobile view issue
- When Ajax is enabled and minim characters length the dropdown doesn't include the option stuff HOT 3
- I have json in back-end With product name and description Search with name is working I want to let list apear based on Name and Product Description Parameters
- Release not done for several years HOT 2
- Abort ajax call when the input is less than minimumInputLength
- Caret navigation is staying even after the if we choose the first option from dropdown, it is only in IOS devices.
- Unselect not working when search field is outside viewport
- Left alignment problem when opened upwards HOT 2
- Support for jQuery 4 HOT 13
- Becoming a contributor to transfer issues
- Is this Repo dead? HOT 1
- Scrolling with keys, while the mouse pointer hovers over the list
- doesn't play well with standard es modules HOT 1
- select2.min.js:2 Select2: The language file for "./i18n/ko" could not be automatically loaded. A fallback will be used instead.
- REQUEST: Select2 identity based on node element or full node address, not on id attribute only. HOT 1
- website not working HOT 12
- Question on commit 181170f, delete button/tabindex HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from select2.