observablehq/inputs

Set a custom table row height

mootari opened this issue · 1 comments

In Inputs.table the row height that is used as basis for height calculations is hardcoded to 22px. If the actual rows deviate from this height, the overall height estimate won't match. As a result the table's scrollbar will misrepresent the total height, causing jumps when rows are lazily loaded.

There is an open issue to create better estimates. In the meantime it would help to be able to define a custom rowHeight basis.

Is that why when setting the number of rows to display I have to add 0.5.
Like this example to show 18 rows I define it to 18.5 so the last row is not a half shown.

Inputs.table(date, { rows: 18.5 })