Skip to content

Commit 07f6077

Browse files
committed
SortableList - adding important note
1 parent 8055593 commit 07f6077

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/components/sortableList/types.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ export interface SortableListProps<ItemT extends SortableListItemProps>
1313
extends Omit<FlatListProps<ItemT>, 'extraData' | 'data'>,
1414
Pick<SortableListContextType<ItemT>, 'scale'> {
1515
/**
16-
* The data of the list, do not update the data.
16+
* The data of the list.
17+
IMPORTANT: Do not update 'data' in 'onOrderChange' (i.e. for each order change); only update it when you change the items (i.g. adding and removing an item).
1718
*/
1819
data: Data<ItemT>;
1920
/**

0 commit comments

Comments
 (0)