Ext JS 4 - Vertical ButtonGroup DOM Exception
-
03-07-2021 - |
Domanda
Getting an exception like this while trying to have a single column vertical buttongroup:
Uncaught Error: INDEX_SIZE_ERR: DOM Exception 1 [ext-all-dev.js:88026]
var btn1 = Ext.create('Ext.button.Button', {
text: 'BTN 1',
iconCls: 'icon-database-go-32'
});
var btn2 = Ext.create('Ext.button.Button', {
text: 'BTN 2',
iconCls: 'icon-data-table-32'
});
var actions = Ext.create('Ext.container.ButtonGroup', {
columns: 1,
defaults: {
scale: 'large',
iconAlign: 'top',
rowspan: 3
},
title: 'Actions',
items: [btn1, btn2]
});
this.dockedItems = [{
xtype: 'toolbar',
dock: 'left',
items: [actions]
}];
Soluzione
Well, the rowspan kills it. Here is a tested example that works
var actions = Ext.create('Ext.container.ButtonGroup', {
columns: 1,
title: 'Actions',
items: [
{
text: 'BTN 2',
iconCls: 'icon-data-table-32',
scale: 'large',
iconAlign: 'top'
}, {
text: 'BTN 1',
iconCls: 'icon-database-go-32',
scale: 'large',
iconAlign: 'top'
}]
});
Here is the JSFiddle
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow