Skip to content

Commit

Permalink
updated README
Browse files Browse the repository at this point in the history
  • Loading branch information
giuliaghisini committed Jun 5, 2020
1 parent 9a66537 commit cf1fceb
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -204,12 +204,14 @@ The edit component of the subblock must extend the class SubblockEdit

If you want to enable drag&drop to reorder subblocks, you have to return content from this function:

- this.props.connectDropTarget
- this.props.connectDragPreview
- this.props.connectDragSource
and compose with DNDSubblocks.
```jsx
return this.props.connectDropTarget(this.props.connectDragPreview(this.props.connectDragSource(<></>)))
```

and compose with DNDSubblocks.

- `this.onChange(obj)` to call when the subblock changes. _obj_ is the object of subblock with new values
- `this.onChange(obj)` to call when the subblock changes.
- _obj_: is the object of subblock with new values
- `this.onFocus(event)` to call when subblock receive focus
- `this.focusNode()` to call when you focus the subblock
- `this.renderDNDButton()` renders drag & drop button for subblock.
Expand Down

0 comments on commit cf1fceb

Please sign in to comment.