From 6fd355f3d4c0cac9dd18e46612c72286a90734ec Mon Sep 17 00:00:00 2001 From: James Kerr Date: Fri, 27 Jan 2023 15:08:58 -0800 Subject: [PATCH] Update Change Log (#102) --- CHANGELOG.md | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 31a7ca2..7356f2f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,21 +1,34 @@ # Version 3.0.0 -## Features +**Breaking Changes** + +- Tree Component `disableDrop` Prop +- NodeApi `isDroppable` property + +**Features** - Disable Edit - Disable Drop Dynamically -### Disable Edit +**Extras** + +- Indent Lines in Cities Demo +- Cypress Integration Tests +- Removed ForwardRef Redeclare + +## Features + +**Disable Edit** The `disableEdit` prop was added to the tree to specify nodes that cannot be edited. This also fixed a bug when pressing the keyboard shortcut "Enter" on a node that did not render a form. The tree would get stuck in the "editing" mode and could not return to the normal mode. -### Disable Drop Dynamically +**Disable Drop Dynamically** The `disableDrop` prop now accepts a function with the arguments described below. Previously you could only provide a static list of nodes that were not droppable, but now you can determine it dynamically. ## Breaking Changes -### Tree Component `disableDrop` Prop +**Tree Component `disableDrop` Prop** If you were passing a function to the `disableDrop` prop, you'll need to update it to use the following signature: @@ -29,6 +42,6 @@ declare function disableDrop(args: { This lets you disallow a drop based on the items being dragged and which node you are hovering over. You might notice it matches the function signature of the onMove handler. It is still possible to pass a string or a boolean to the `disableDrop` prop to prevent drops statically. -### NodeApi `isDroppable` property +**NodeApi `isDroppable` property** The `.isDroppable` property has been removed from the NodeApi class. This is now determined dynamically from the tree's state. It doesn't make sense to ask an single node if it is droppable anymore.