forked from TFMM/silent-auction
fix: restore background color and borders to tomselect inputs
This commit is contained in:
@@ -1,12 +1,16 @@
|
|||||||
<script src="https://cdn.jsdelivr.net/npm/tom-select@2.4.3/dist/js/tom-select.complete.min.js"></script>
|
<script src="https://cdn.jsdelivr.net/npm/tom-select@2.4.3/dist/js/tom-select.complete.min.js"></script>
|
||||||
<link href="https://cdn.jsdelivr.net/npm/tom-select@2.4.3/dist/css/tom-select.bootstrap5.min.css" rel="stylesheet">
|
<link href="https://cdn.jsdelivr.net/npm/tom-select@2.4.3/dist/css/tom-select.bootstrap5.min.css" rel="stylesheet">
|
||||||
|
<style>
|
||||||
|
/* Ensure the TomSelect container doesn't get a transparent background */
|
||||||
|
.ts-control {
|
||||||
|
background-color: white !important;
|
||||||
|
border: 1px solid #ddd !important;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
<script>
|
<script>
|
||||||
document.addEventListener('DOMContentLoaded', () => {
|
document.addEventListener('DOMContentLoaded', () => {
|
||||||
document.querySelectorAll('select').forEach((el) => {
|
document.querySelectorAll('select').forEach((el) => {
|
||||||
// Check if Tom Select is already initialized
|
if (el.tomselect) return;
|
||||||
if (el.tomselect) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
new TomSelect(el, {
|
new TomSelect(el, {
|
||||||
create: false,
|
create: false,
|
||||||
|
|||||||
Reference in New Issue
Block a user