提交 26236f04 编写于 作者: J Josh Schmidt

tom-select 1.4, css updates, hide search, customProperties

上级 785dae91
......@@ -91,7 +91,7 @@
"imask": "^6.0.7",
"litepicker": "^2.0.11",
"nouislider": "^14.6.3",
"tom-select": "^1.3.0"
"tom-select": "^1.4.0"
},
"resolutions": {
"**/**/node-gyp": "^5.0.0"
......
......@@ -56,7 +56,28 @@
var el;
window.TomSelect && ({% if jekyll.environment == 'development' %}window.tabler_select["select-{{ id }}"] = {% endif %}new TomSelect(el = document.getElementById('select-{{ id }}'), {
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>';
},
},
}));
});
......
@import "~tom-select/src/scss/tom-select.bootstrap5.scss";
.ts-control.form-select{
border: none !important;
padding: 0 !important;
.ts-control{
.dropdown-menu {
width: 100%;
height: auto;
}
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册