Skip to content

Commit

Permalink
Update Change Log (#102)
Browse files Browse the repository at this point in the history
  • Loading branch information
jameskerr authored Jan 27, 2023
1 parent a9c3c5b commit 6fd355f
Showing 1 changed file with 18 additions and 5 deletions.
23 changes: 18 additions & 5 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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:

Expand All @@ -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.

0 comments on commit 6fd355f

Please sign in to comment.