yaronn / blessed-contrib

Build terminal dashboards using ascii/ansi art and javascript

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

TableOptions.columnWidth to accept percentages

danikaze opened this issue · 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%'] });