8000 [types] adds better descriptions to ItemInterface · codemic-pl/react-sortablejs@23b15ae · GitHub
[go: up one dir, main page]

Skip to content
This repository was archived by the owner on Jan 6, 2024. It is now read-only.

Commit 23b15ae

Browse files
author
Wayne Van Son
committed
[types] adds better descriptions to ItemInterface
1 parent 896a4bd commit 23b15ae

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/types.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,13 @@ import { ReactSortable } from "./react-sortable";
1212
//@todo: remove dynamic types and create declarative types instead for readability of user.
1313
// add these in docs as well
1414
export interface ItemInterface {
15+
/** The unique id associated with your item. It's recommended this is the same as the key prop for your list item. */
1516
id: string | number;
17+
/** When true, the item is selected using MultiDrag */
1618
selected?: boolean;
19+
/** When true, the item is deemed "chosen", which basically just a mousedown event. */
1720
chosen?: boolean;
21+
/** When true, it will not be possible to pick this item up in the list. */
1822
filtered?: boolean;
1923
[property: string]: any;
2024
}

0 commit comments

Comments
 (0)
0