*/
/**
- * @cfg {String/Roo.Template} tpl The template to use to render the output
+ * @cfg {String/Roo.Template} tpl The template to use to render the output default is '<a class="dropdown-item" href="#">{' + this.displayField + '}</a>'
*/
/**
multiple : false,
/**
- * @cfg {String} invalidClass The CSS class to use when marking a field invalid (defaults to "x-form-invalid")
+ * @cfg {String} invalidClass DEPRICATED - uses BS4 is-valid now
*/
invalidClass : "has-warning",
/**
- * @cfg {String} validClass The CSS class to use when marking a field valid (defaults to "x-form-invalid")
+ * @cfg {String} validClass DEPRICATED - uses BS4 is-valid now
*/
validClass : "has-success",
var box = {
tag: 'div',
+ style : 'display: contents',
cn: [
{
tag: 'input',
var combobox = {
cls: 'roo-select2-container input-group roo-select2-container-multi',
cn: [
+
box
// {
// tag: 'ul',
combobox.cn.push(feedback);
}
+
+
var indicator = {
tag : 'i',
cls : 'roo-required-indicator ' + (this.indicatorpos == 'right' ? 'right' : 'left') +'-indicator text-danger fa fa-lg fa-star',
}
if (align ==='left' && this.fieldLabel.length) {
- cfg.cls += ' roo-form-group-label-left row';
+ cfg.cls += ' roo-form-group-label-left' + (Roo.bootstrap.version == 4 ? ' row' : '');
cfg.cn = [
indicator,
*/
if(!this.tpl){
- this.tpl = '<li><a href="#">{' + this.displayField + '}</a></li>';
+ this.tpl = Roo.bootstrap.version == 4 ?
+ '<a class="dropdown-item" href="#">{' + this.displayField + '}</a>' : // 4 does not need <li> and it get's really confisued.
+ '<li><a class="dropdown-item" href="#">{' + this.displayField + '}</a></li>';
}
this.view = new Roo.View(this.list, this.tpl, {
});
}
- var box = {
- tag: 'div',
- cn: [
- {
- tag: 'input',
- type : 'hidden',
- cls: 'form-hidden-field'
- },
- inputblock
- ]
-
- };
+
+ var ibwrap = inputblock;
if(this.multiple){
- box = {
- tag: 'div',
- cn: [
- {
- tag: 'input',
- type : 'hidden',
- cls: 'form-hidden-field'
- },
+ ibwrap = {
+ tag: 'ul',
+ cls: 'roo-select2-choices',
+ cn:[
{
- tag: 'ul',
- cls: 'roo-select2-choices',
- cn:[
- {
- tag: 'li',
- cls: 'roo-select2-search-field',
- cn: [
+ tag: 'li',
+ cls: 'roo-select2-search-field',
+ cn: [
- inputblock
- ]
- }
+ inputblock
]
}
]
- }
- };
+ };
+
+
+ }
var combobox = {
cls: 'roo-select2-container input-group roo-touchview-combobox ',
cn: [
- box
+ {
+ tag: 'input',
+ type : 'hidden',
+ cls: 'form-hidden-field'
+ },
+ ibwrap
]
};
if(!this.multiple && this.showToggleBtn){
var caret = {
- tag: 'span',
- cls: 'caret'
+ cls: 'caret'
};
if (this.caret != false) {
tag :'span',
cls : 'input-group-addon input-group-append input-group-text btn dropdown-toggle',
cn : [
- caret,
+ Roo.bootstrap.version == 3 ? caret : '',
{
tag: 'span',
cls: 'combobox-clear',