mirror of
https://github.com/Maks1mS/bubbles.git
synced 2024-12-23 22:32:59 +03:00
Improve insert item documentation (#115)
This commit is contained in:
parent
18d25458da
commit
005233b529
@ -324,7 +324,8 @@ func (m *Model) SetItem(index int, item Item) tea.Cmd {
|
||||
return cmd
|
||||
}
|
||||
|
||||
// Insert an item at the given index. This returns a command.
|
||||
// Insert an item at the given index. If index is out of the upper bound, the
|
||||
// item will be appended. This returns a command.
|
||||
func (m *Model) InsertItem(index int, item Item) tea.Cmd {
|
||||
var cmd tea.Cmd
|
||||
m.items = insertItemIntoSlice(m.items, item, index)
|
||||
|
Loading…
Reference in New Issue
Block a user