@@ -7,14 +7,14 @@ import {
77 ReactElement ,
88 RefObject
99} from "react" ;
10- import Sortable , { MoveEvent , Options , SortableEvent , Swap } from "sortablejs" ;
10+ import Sortable , { MoveEvent , Options , SortableEvent } from "sortablejs" ;
1111import {
1212 AllMethodsExceptMove ,
1313 HandledMethodNames ,
14+ ItemInterface ,
1415 ReactSortableProps ,
1516 Store ,
16- UnHandledMethodNames ,
17- ItemInterface
17+ UnHandledMethodNames
1818} from "./types" ;
1919import { destructurePropsForOptions , insertNodeAt , removeNode } from "./util" ;
2020
@@ -55,7 +55,7 @@ export class ReactSortable<T extends ItemInterface> extends Component<
5555
5656 render ( ) {
5757 const { tag, style, className, id } = this . props ;
58- const classicProps = { style, className, id } ;
58+ const classicProps = { style, className, id } ;
5959
6060 /** if no tag, default to a `div` element */
6161 const newTag = ! tag || tag === null ? "div" : tag ;
@@ -87,7 +87,6 @@ export class ReactSortable<T extends ItemInterface> extends Component<
8787 if ( ! children || children == null ) return null ;
8888
8989 const dataid = dataIdAttr || "data-id" ;
90- const className = "" ;
9190
9291 return Children . map ( children as ReactElement < any > [ ] , child =>
9392 cloneElement ( child , {
@@ -276,8 +275,8 @@ export class ReactSortable<T extends ItemInterface> extends Component<
276275 insertNodeAt ( evt . from , curr . element , curr . oldIndex )
277276 ) ;
278277
279- const { list, setList } = this . props ;
280- const newState : T [ ] = [ ...list ] ;
278+ const { list, setList } = this . props ;
279+ const newState : T [ ] = [ ...list ] ;
281280
282281 newOldIndices
283282 // remove old items in state, starting from the end.
@@ -320,7 +319,6 @@ export class ReactSortable<T extends ItemInterface> extends Component<
320319 /** @todo */
321320 onSelect ( evt : SortableEvent ) {
322321 const { oldIndex, newIndex } = evt ;
323- console . log ( { oldIndex, newIndex } ) ;
324322 // append the class name the classes of the item
325323 // do it on the item?
326324 // a seperate state?
0 commit comments