Feature request: render an empty footer
vRallev opened this issue · comments
Ralf Wondratschek commented
Imagine this table
table {
style {
borderStyle = Solid
}
cellStyle {
borderLeft = true
borderRight = true
}
header {
cellStyle {
border = true
alignment = BottomLeft
}
row("Header 1", "Header 2")
}
body {
repeat(3) {
row("row $it", "row $it")
}
}
}
It would render:
┌────────┬────────┐
│Header 1│Header 2│
├────────┼────────┤
│row 0 │row 0 │
│row 1 │row 1 │
│row 2 │row 2 │
Notice that the border at the bottom is missing. The fix is could be to render a different row in the body
row {
cell("last row") {
borderBottom = true
}
cell("last row") {
borderBottom = true
}
}
Or another fix could be to render a footer:
footer {
cellStyle {
borderBottom = true
}
row("Footer 1", "Footer 2")
}
But this is annoying, because the last row is a special case. I'd rather would like to specify a footer like this:
footer {
cellStyle {
border = true
}
}
But this doesn't render anything since there is no row.
Jake Wharton commented
Ralf Wondratschek commented
I missed that, it works as expected.
Jake Wharton commented
Great!