From cf1fcebde9f541ade0134ff1d795f87008c919d8 Mon Sep 17 00:00:00 2001 From: Giulia Ghisini Date: Sat, 6 Jun 2020 00:34:58 +0200 Subject: [PATCH] updated README --- README.md | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 696cd4a..463053b 100644 --- a/README.md +++ b/README.md @@ -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.