ui/table: fix width calculation of multi-line column headers

This commit is contained in:
Michael Eischer 2024-06-07 21:44:49 +02:00
parent e9de9684f4
commit edd3e214c2
2 changed files with 16 additions and 1 deletions

View file

@ -29,6 +29,21 @@ first column
----------------------
data: first data field
----------------------
`,
},
{
func(t testing.TB) *Table {
table := New()
table.AddColumn("first\ncolumn", "{{.First}}")
table.AddRow(struct{ First string }{"data"})
return table
},
`
first
column
------
data
------
`,
},
{