Commit Graph

16 Commits

Author SHA1 Message Date
b0d8d9f0bf feat(TreeItem): Added PartialEq and Eq constraints to the types that can be passed to the TreeItem struct 2024-11-15 14:40:44 -07:00
959b60de32 style: Applied formatting to all files 2024-11-15 12:50:14 -07:00
6c10db760d fix: Changed the implementation to not require the direct use of identifiers, and to instead generate them using the hashes of the contents of each tree item 2024-11-14 17:35:40 -07:00
8a91f662dd fix: Changed the type constraints to use the ToText Ratatui trait 2024-11-14 16:38:38 -07:00
3e23a73f6b feat: Updated the Ratatui Tree Widget to allow the tree to story any data type that implements Into<Text>, so that users can also easily fetch data from within the tree based on what's selected for non-text data types. 2024-11-14 15:38:37 -07:00
735f111866 feat: Changed the tree to accept any type that implements Into<Text> so I can use the tree to fully store structs in the TUI as well as listing them 2024-11-13 13:06:15 -07:00
EdJoPaTo
d676f66504 fix: must_use the structs 2024-05-23 15:15:08 +02:00
EdJoPaTo
051f49fd72 refactor(state)!: use same naming pattern for getters
BREAKING CHANGE: instead of deprecating selected, change it directly.
The old behaviour can be achieved with a `.collect::<Vec<_>>()` easily.
2024-05-22 14:52:57 +02:00
EdJoPaTo
d23f55b2ad feat(state): click_at (#36) 2024-05-22 08:35:06 +02:00
EdJoPaTo
fc2495396f fixup! refactor: improve lifetime names 2024-05-15 17:08:35 +02:00
EdJoPaTo
2811a79713 perf(state): less clones on handling the selection 2024-05-15 13:51:54 +02:00
EdJoPaTo
bba94dcf88 perf(state): const get_open
no need for additional logic, its read only anyway

The only reason for this was to keep the API with less breaking changes.
Performance is more important.
2024-05-15 13:51:54 +02:00
EdJoPaTo
04ecf5388f docs(state): improve comments 2024-05-15 13:51:54 +02:00
EdJoPaTo
537dc8021e perf(flatten): fewer clones 2024-05-15 13:49:50 +02:00
EdJoPaTo
fdd2c5436a feat!: cache last tree structure to simplify events
Things like key up/down dont require the items anymore to be used.
Instead a cached last state from last render is used.
2024-05-15 12:49:37 +02:00
EdJoPaTo
a60eb5266b refactor: simplify docs and LSP hints with names exactly as exported 2024-03-14 11:55:10 +01:00