mirror of
https://github.com/tabler/tabler.git
synced 2025-12-21 17:34:25 +04:00
tom-select 1.4, css updates, hide search, customProperties
This commit is contained in:
@@ -91,7 +91,7 @@
|
|||||||
"imask": "^6.0.7",
|
"imask": "^6.0.7",
|
||||||
"litepicker": "^2.0.11",
|
"litepicker": "^2.0.11",
|
||||||
"nouislider": "^14.6.3",
|
"nouislider": "^14.6.3",
|
||||||
"tom-select": "^1.3.0"
|
"tom-select": "^1.4.0"
|
||||||
},
|
},
|
||||||
"resolutions": {
|
"resolutions": {
|
||||||
"**/**/node-gyp": "^5.0.0"
|
"**/**/node-gyp": "^5.0.0"
|
||||||
|
|||||||
@@ -56,7 +56,28 @@
|
|||||||
var el;
|
var el;
|
||||||
window.TomSelect && ({% if jekyll.environment == 'development' %}window.tabler_select["select-{{ id }}"] = {% endif %}new TomSelect(el = document.getElementById('select-{{ id }}'), {
|
window.TomSelect && ({% if jekyll.environment == 'development' %}window.tabler_select["select-{{ id }}"] = {% endif %}new TomSelect(el = document.getElementById('select-{{ id }}'), {
|
||||||
copyClassesToDropdown: false,
|
copyClassesToDropdown: false,
|
||||||
|
dropdownClass: 'dropdown-menu',
|
||||||
|
//dropdownContentClass: 'ts-dropdown-content',
|
||||||
|
optionClass:'dropdown-item',
|
||||||
|
|
||||||
|
{% unless include.show-search %}
|
||||||
|
controlInput: '<input>',
|
||||||
|
{% endunless %}
|
||||||
|
|
||||||
|
render:{
|
||||||
|
item: function(data,escape) {
|
||||||
|
if( data.customProperties ){
|
||||||
|
return '<div><span class="dropdown-item-indicator">' + data.customProperties + '</span>' + escape(data.text) + '</div>';
|
||||||
|
}
|
||||||
|
return '<div>' + escape(data.text) + '</div>';
|
||||||
|
},
|
||||||
|
option: function(data,escape){
|
||||||
|
if( data.customProperties ){
|
||||||
|
return '<div><span class="dropdown-item-indicator">' + data.customProperties + '</span>' + String(data.text) + '</div>';
|
||||||
|
}
|
||||||
|
return '<div>' + String(data.text) + '</div>';
|
||||||
|
},
|
||||||
|
},
|
||||||
}));
|
}));
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|||||||
10
src/scss/vendor/_tom-select.scss
vendored
10
src/scss/vendor/_tom-select.scss
vendored
@@ -1,6 +1,10 @@
|
|||||||
@import "~tom-select/src/scss/tom-select.bootstrap5.scss";
|
@import "~tom-select/src/scss/tom-select.bootstrap5.scss";
|
||||||
|
|
||||||
.ts-control.form-select{
|
.ts-control{
|
||||||
border: none !important;
|
.dropdown-menu {
|
||||||
padding: 0 !important;
|
width: 100%;
|
||||||
|
height: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user