Skip to main content

Changelog

2.3.4 - 18/01/2024

Other Changes

  • Make the onDidChangeTreeDataEmitter prop on a static data provider public

2.3.3 - 18/01/2024

Bug Fixes and Improvements

  • Maintain original item order when dropping items (#315)
  • Expose some hooks and internally used components in the public API that were hidden before (#313)

2.3.2 - 05/12/2023

Bug Fixes and Improvements

  • Improved the implementation of the onSelectItems prop to not run during a React update, which was causing issues in some cases (#278)

2.3.1 - 04/12/2023

Bug Fixes

  • Items dropped at the bottom most position (outside of the rectangle of tree items, but still inside the tree container) will now be placed in the root item, at the final position, instead of the contents of the last open item (#261)

2.3.0 - 30/11/2023

Breaking Changes

  • Changed the behavior for dropping an item at the bottom of an open folder has changed, and will now drop into the open folder at its top, instead of the parent folder below the open folder. See discussion at #148 for details. You can opt out of this behavior by setting the canDropBelowOpenFolders prop on the tree environment (#148).

Bug Fixes

  • Fixed a bug where the canRename property in a tree item payload was not respected.

2.2.4 - 27/11/2023

Features

2.2.3 - 24/10/2023

Bug Fixes and Improvements

  • Fix Syntax Error in CSS styles (#288)

2.2.2 - 31/07/2023

Features

  • Introduce disableMultiselect property on uncontrolled tree environment (#279)

Bug Fixes and Improvements

  • Fixes a bug where a state property is updated when the component is unmounted (#278)

2.2.1 - 22/07/2023

2.2.0 - 14/06/2023

Features

  • Added stopRenamingItem() function to item render context (#271)

Bug Fixes and Improvements

  • Added check in onMissingItems in case dataProvider.getTreeItems return null as tree value (#272)
  • Remove unused types renderDraggingItem and renderDraggingItemTitle
  • Don't use timeout to update linear items (#266)

2.1.5-alpha.0 - 20/05/2023

2.1.4 - 16/05/2023

2.1.4-alpha.0 - 02/05/2023

Bug Fixes and Improvements

  • Fixed globally-scoped references to the document prop into a getter that doesn't fail in ssr environments (#259)

2.1.3 - 02/05/2023

Bug Fixes and Improvements

  • Fixed a bug where dragging to an item and back to the original position would still drop the item on the temporary position (#249)

2.1.2 - 02/04/2023

Bug Fixes and Improvements

  • Fixed a bug where the icon was misaligned when scrolling in the modern theme (#239)

2.1.1 - 27/02/2023

Bug Fixes and Improvements

  • Fixes bug where dropping an item on its own descendant makes it vanish (#227)

2.1.0 - 24/02/2023

Bug Fixes and Improvements

  • Dragging on a non-folder item with canDropOnNonFolder=false and canReorderItems=false will now target the item's parent. (#219)

2.0.4 - 05/02/2023

Bug Fixes and Improvements

  • Fix: Previous release did not include the new css file.

2.0.3 02/04/2023

Features

  • Introduced new tree theme. You can opt into the new theme by importing style-modern.css instead of style.css

Other Changes

  • Fixed broken props-tables documentations for react components.
  • Fixed incomplete getstarted documentation page.

2.0.2 12/31/2022

Bug Fixes and Improvements

  • Fixed a bug where dragging a node above the topmost node throws an error in the log (#203)
  • Fixed a bug where dragging an item onto itself would make it disappear from the tree (#205)

2.0.1 12/18/2022

Bug Fixes and Improvements

  • Fixed a bug where autofocus for the search input was not working for blueprintjs renderers (#197)
  • Fixed a bug where tree labels where not set (#195)
  • Reduce react peer dependency requirement to v16 (#196)

Other Changes

  • Upgraded storybook and yarn dependencies in dev tooling
  • Added release pipeline in CI

2.0.0 - 12/05/2022

Breaking Changes

  • Replaced item.hasChildren property with item.isFolder
  • Replaced environment.canDropOnItemWithChildren property with environment.canDropOnFolder
  • Replaced environment.canDropOnItemWithoutChildren property with environment.canDropOnNonFolder
  • Replaced CSS classes related to hasChildren with isFolder, e.g. rct-tree-item-li-hasChildren to rct-tree-item-li-isFolder

Note: These properties were just renamed, but the functionality is the same. hasChildren has always denoted whether an item is a folder or not, which confused a lot of people and was admittedly very bad naming. The new name is a better reflection of its functionality. The other two properties were renamed alongside to match.

Bug Fixes and Improvements

  • Upgraded library to React 18.
  • Improved how "select up to" (i.e. shift+clicking) works, to match how users would expect it to work. The user can now create multiple distinct selection ranges by clicking and shift-clicking another item, then control clicking a different item and shift+control clicking a forth item.
  • The function treeItemActions.selectUpTo() now accepts an optional boolean argument determining whether the previous selection range should be cleared before selecting the new range.
  • Removed unnecessary memoization for event handlers, favoring stable callbacks stored in refs instead.
  • Fixed a bug where renaming an item would make the page loose focus of the active tree.
  • Items can now be dropped on empty trees. The tree container will need to be rendered with a minimum height for this to work, in the default renderers the container will now render with a minimum height of 30px, which can be adjusted in custom renderers.
  • Fixed a bug where renaming from item renderer context was not working.

Other Changes

  • Added linter rules from airbnb config and fixed relevant issues. This fixed some memoization imperfections, which should improve performance.
  • (Finally) added integration tests. This will ease the future development and help reduce regressions.

Migration guide

  • Replace the hasChildren property for tree items with isFolder.
  • Replace the canDropOnItemWithChildren property on tree environment components or tree components with canDropOnFolder.
  • Replace the canDropOnItemWithoutChildren property on tree environment components or tree components with canDropOnNonFolder.
  • The upgrade of React to 18 should not require any changes on your end.
  • If you are using custom interaction managers and want to benefit from the improved "select up to" functionality, replace actions.selectUpTo() with actions.selectUpTo(!e.ctrlKey) in the onClick handler.
  • If you are overwriting CSS styles for rct-specific classes, replace hasChildren with isFolder in the class names.