@@ -21,7 +21,7 @@ export const Default: Story = {
2121 draggedClassName : "yl-bg-primary" ,
2222 draggedOverClassName : "yl-bg-rose-500" ,
2323 isDraggable : true ,
24- onSorted : ( items : IDraggableListItem [ ] ) => {
24+ onDragged : ( items : IDraggableListItem [ ] ) => {
2525 return new Promise ( resolve => {
2626 setTimeout ( ( ) => {
2727 resolve ( items ) ;
@@ -32,22 +32,26 @@ export const Default: Story = {
3232 {
3333 id : 1 ,
3434 title : "Item 1" ,
35- description : "Description 1"
35+ description : "Description 1" ,
36+ order : 1
3637 } ,
3738 {
3839 id : 2 ,
3940 title : "Item 2" ,
40- description : "Description 2"
41+ description : "Description 2" ,
42+ order : 2
4143 } ,
4244 {
4345 id : 3 ,
4446 title : "Item 3" ,
45- description : "Description 3"
47+ description : "Description 3" ,
48+ order : 3
4649 } ,
4750 {
4851 id : 4 ,
4952 title : "Item 4" ,
50- description : "Description 4"
53+ description : "Description 4" ,
54+ order : 4
5155 }
5256 ]
5357 }
@@ -58,7 +62,7 @@ export const WithOneItem: Story = {
5862 draggedClassName : "yl-bg-primary" ,
5963 draggedOverClassName : "yl-bg-rose-500" ,
6064 isDraggable : true ,
61- onSorted : ( items : IDraggableListItem [ ] ) => {
65+ onDragged : ( items : IDraggableListItem [ ] ) => {
6266 return new Promise ( resolve => {
6367 setTimeout ( ( ) => {
6468 resolve ( items ) ;
@@ -69,7 +73,8 @@ export const WithOneItem: Story = {
6973 {
7074 id : 1 ,
7175 title : "Item 1" ,
72- description : "Description 1"
76+ description : "Description 1" ,
77+ order : 1
7378 }
7479 ]
7580 }
0 commit comments