Skip to content

Commit 223cb59

Browse files
committed
Update README.md
1 parent ee52f8f commit 223cb59

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,9 @@ const SortableList = ({ items, onChange }) => {
7777

7878
// [Optional] The onChange method allows you to implement a controlled component and keep
7979
// DOM nodes untouched. You have to change state to re-render the component.
80-
onChange={(order) => {
80+
// @param {Array} order An ordered array of items, defined by the `data-id` attribute.
81+
// @param {Object} sortable The sortable instance.
82+
onChange={(order, sortable) => {
8183
onChange(order);
8284
}}
8385
>

0 commit comments

Comments
 (0)