blessed-contrib icon indicating copy to clipboard operation
blessed-contrib copied to clipboard

TableOptions.columnWidth to accept percentages

Open danikaze opened this issue 5 years ago • 0 comments

Grid is meant to be used with number of columns, which means percentage of the width/height of the screen.

This means the real size of a grid cell is not available (which is ok for responsive designs). But when creating a Table, columnsWidth is required to be specified in absolute values, which makes no sense if the width of the table inside a grid is specified in screen percentage.

This issue is to allow columnsWidth to accept relative values like

const table = grid.set(0, 0, 1, 1, contrib.table, { columnsWidth: ['20%', '50%', '30%'] });

danikaze avatar Aug 19 '19 06:08 danikaze