Skip to content

Releases: EdJoPaTo/tui-rs-tree-widget

v0.20.0

22 May 20:03
1365992
Compare
Choose a tag to compare
  • Simplification of TreeState usage
    • key / mouse / selection methods don't require the items anymore. Instead, they assume the state of last render.
    • add TreeState::click_at and TreeState::rendered_at #36
    • add TreeState::opened and simplify TreeState::selected for direct access to current values by reference
    • rename TreeState::select_visible_relative to TreeState::select_relative due to confusion what 'visible' means
    • less internal clones
  • Tree::new takes items as reference. #32
  • TreeItem::style is now part of TreeItem::text
  • add TreeItem::identifier for access to the identifier of the item #38

BREAKING CHANGES:

  • TreeState key / mouse / selection methods no longer take the items argument.
  • TreeState::selected returns a reference instead of a Vec.
  • TreeState is no longer Cloneable due to holding the state of last render
  • TreeItem::style is gone and used from TreeItem::text

Thanks to @sandercm and @fioncat for their PRs and @thscharler for the ideas leading to some improvements ✨

v0.19.0

26 Feb 20:17
d5f3635
Compare
Choose a tag to compare
  • feat(state)!: return true when something changed ed9a54a
  • fix: do not move offset on unselect 15f05be
  • refactor!: remove get_identifier_without_leaf a2f8100

BREAKING CHANGES:

  • state methods return when something changed ed9a54a
  • get_identifier_without_leaf is gone. Reimplement yourself or use Vec::pop() a2f8100

v0.18.0

24 Feb 18:21
d3386fe
Compare
Choose a tag to compare
  • fix!: remove start_corner 85bfecc
  • perf: get item.height() less often on render 4130a80
  • perf: prefer into_iter() over clone() 86458ff
  • experimental scrollbar support (API might change on any release)

BREAKING CHANGES: start_corner is gone

v0.17.0

03 Feb 02:31
3cafeae
Compare
Choose a tag to compare
  • feat: scroll independently from selection 01726df
  • feat: select_*() returns whether it changed 969b78a
  • build: update to ratatui 0.26 4cbe932
  • perf(key_left): remove clones 632a95f
  • perf!: flatten -> TreeState::flatten d1a2412

BREAKING CHANGES:

flatten -> TreeState::flatten d1a2412

-tui_tree_widget::flatten(state.get_all_opened(), &items);
+state.flatten(&items);

v0.16.0

18 Dec 14:30
4545b90
Compare
Choose a tag to compare

Nothing changed besides the ratatui version which was updated to v0.25

v0.15.0

30 Oct 12:29
6c43737
Compare
Choose a tag to compare
  • feat: generic identifier (#27) b914819
  • feat: add TreeState::select_visible_index and relative 9a47f5e

BREAKING CHANGE: the generic identifier requires some different method arguments.
Mainly this introduces the identifier argument on TreeItem::new.
See its documentation on docs.rs for more background.

v0.14.0

24 Oct 18:01
cf67025
Compare
Choose a tag to compare
  • build: update to ratatui 0.24 87e1bb4
  • perf!: accept Vec explicitly b4d0c30
  • perf: use more const functions 0d9d132

BREAKING CHANGE: in some spaces a Vec needs to be supplied explicitly. This prevents accidental clones. See b4d0c30

v0.13.0

04 Sep 11:25
18bc19a
Compare
Choose a tag to compare

v0.12.0

20 May 00:46
Compare
Choose a tag to compare

BREAKING CHANGES:

  • refactor(identifier)!: return usize instead of &usize 838668d

v0.11.0

31 Aug 17:10
Compare
Choose a tag to compare
  • feat: toggle with identifier 63a5fa0
  • feat: implement TreeState select first/last b019567
  • feat: implement TreeState arrow key methods c0e4967

BREAKING CHANGE:
TreeState::toggle is now named TreeState::toggle_selected. The toggle method now has an argument for the identifier to be toggled while the new toggle_selected keeps the old behavior of toggling the currently selected entry.