charmbracelet / charmbracelet/bubbles
List: Provide Index of SelectedItem in all items
Open
- Dominant language
- Go
- Stars
- 8.9k
- Forks
- 457
- Avg merge
- 1d 18h
- Merged PRs (30d)
- 5
Description
With [ccmanager](https://github.com/dodevops/ccmanager) I have a backend refresh system that updates list items from time to time. It uses SetItem to update the item when it is changed and uses Index to get the index of the item to replace. However, when filtering is used, Index returns the index of the selected *filtered* item and not which index the item holds in the slice of all items.
To be backwards compatible, I'd propose a "IndexOfSelectedItem" variable to get the index of the currently selected item in the slice of all items.
Or am I missing something here?
Contributor guide
Assessment
This issue has not been assessed yet.