Skip to content

Commit

Permalink
Add a comment to the flex column example (#61)
Browse files Browse the repository at this point in the history
  • Loading branch information
Evertras authored Apr 14, 2022
1 parent ceafdce commit 1c1481a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions examples/flex/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,11 @@ func NewModel() Model {
return Model{
flexTable: table.New([]table.Column{
table.NewColumn(columnKeyName, "Name", 10),
// This table uses flex columns, but it will still need a target
// width in order to know what width it should fill. In this example
// the target width is set below in `recalculateTable`, which sets
// the table to the width of the screen to demonstrate resizing
// with flex columns.
table.NewFlexColumn(columnKeyElement, "Element", 1),
table.NewFlexColumn(columnKeyDescription, "Description", 3),
}).WithRows([]table.Row{
Expand Down

0 comments on commit 1c1481a

Please sign in to comment.