Set minWidth for columns
This commit is contained in:
parent
3d43f77514
commit
b409b849d4
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
@ -276,10 +276,14 @@ export default class DataTable {
|
||||
// set initial width as naturally calculated by table's first row
|
||||
this.bodyScrollable.find('.data-table-row[data-row-index="0"] .data-table-col').each(function () {
|
||||
const $cell = $(this);
|
||||
const width = parseInt($cell.find('.content').css('width'), 10);
|
||||
let width = parseInt($cell.find('.content').css('width'), 10);
|
||||
const height = parseInt($cell.find('.content').css('height'), 10);
|
||||
const { colIndex } = self.getCellAttr($cell);
|
||||
const minWidth = self.getColumnMinWidth(colIndex);
|
||||
|
||||
if (width < minWidth) {
|
||||
width = minWidth;
|
||||
}
|
||||
self.setColumnWidth(colIndex, width);
|
||||
self.setDefaultCellHeight(height);
|
||||
});
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user