add min size for row num column (#2518)

This commit is contained in:
Anthony Dresser
2018-09-11 17:09:17 -07:00
committed by Karl Burtram
parent c73af4c480
commit b3fbe47f0a

View File

@@ -52,7 +52,8 @@ export class RowNumberColumn<T> implements Slick.Plugin<T> {
}
public getColumnDefinition(): Slick.Column<T> {
let columnWidth = this.options.numberOfRows.toString().length * sizePerDigit;
// that smallest we can make it is 22 due to padding and margins in the cells
let columnWidth = Math.max(this.options.numberOfRows.toString().length * sizePerDigit, 22);
return {
id: 'rowNumber',
name: '',