mirror of
https://github.com/charmbracelet/lipgloss.git
synced 2024-11-23 14:26:29 +03:00
docs: include warning about table offset (#408)
This commit is contained in:
parent
2d260ce065
commit
f34b553405
@ -453,6 +453,9 @@ fmt.Println(t)
|
||||
|
||||
![Table Example](https://github.com/charmbracelet/lipgloss/assets/42545625/6e4b70c4-f494-45da-a467-bdd27df30d5d)
|
||||
|
||||
> [!WARNING]
|
||||
> Table `Rows` need to be declared before `Offset` otherwise it does nothing.
|
||||
|
||||
For more on tables see [the docs](https://pkg.go.dev/github.com/charmbracelet/lipgloss?tab=doc) and [examples](https://github.com/charmbracelet/lipgloss/tree/master/examples/table).
|
||||
|
||||
## Rendering Lists
|
||||
|
@ -209,6 +209,9 @@ func (t *Table) Height(h int) *Table {
|
||||
}
|
||||
|
||||
// Offset sets the table rendering offset.
|
||||
//
|
||||
// Warning: you may declare Offset only after setting Rows. Otherwise it will be
|
||||
// ignored.
|
||||
func (t *Table) Offset(o int) *Table {
|
||||
t.offset = o
|
||||
return t
|
||||
|
Loading…
Reference in New Issue
Block a user