Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit d706ec9

Browse files
atopusgitim
authored andcommitted
Return the new list order on release row (#117)
* add the current order to _onReleaseRow callback * add the current order to _onReleaseRow callback
1 parent 575abd8 commit d706ec9

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

‎README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,8 @@ Called when rows were reordered, takes an array of rows keys of the next rows or
5656
`(key) => void`<br />
5757
Called when a row was activated (user long tapped).
5858
- **onReleaseRow?** (function)<br />
59-
`(key) => void`<br />
60-
Called when the active row was released.
59+
`(key, currentOrder) => void`<br />
60+
Called when the active row was released. Returns the key and the new list order.
6161
- **onPressRow?** (function)<br />
6262
`(key) => void`<br />
6363
Called when a row was pressed.

‎src/SortableList.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -599,7 +599,7 @@ export default class SortableList extends Component {
599599
}));
600600

601601
if (this.props.onReleaseRow) {
602-
this.props.onReleaseRow(rowKey);
602+
this.props.onReleaseRow(rowKey,this.state.order);
603603
}
604604
};
605605

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /