8000 [compoennt] adds clones type and formats comments · andrewvmail/react-sortablejs@6c1d5e5 · GitHub
[go: up one dir, main page]

Skip to content

Commit 6c1d5e5

Browse files
author
Wayne Van Son
committed
[compoennt] adds clones type and formats comments
1 parent 28dcb8b commit 6c1d5e5

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

src/react-sortable.tsx

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ Please read the updated README.md at https://github.com/SortableJS/react-sortabl
7474
const { tag, style, className, id } = this.props;
7575
const classicProps = { style, className, id };
7676

77-
/** if no tag, default to a `div` element */
77+
// if no tag, default to a `div` element.
7878
const newTag = !tag || tag === null ? "div" : tag;
7979
return createElement(
8080
newTag,
@@ -279,12 +279,10 @@ Please read the updated README.md at https://github.com/SortableJS/react-sortabl
279279
return setList(newList, this.sortable, store);
280280
}
281281

282-
/** Called when the dragging starts */
283282
onStart(evt: SortableEvent) {
284283
store.dragging = this;
285284
}
286285

287-
/** Called when the dragging ends */
288286
onEnd(evt: SortableEvent) {
289287
store.dragging = null;
290288
}
@@ -303,7 +301,6 @@ Please read the updated README.md at https://github.com/SortableJS/react-sortabl
303301
setList(newList, this.sortable, store);
304302
}
305303

306-
/** Called when the `onSpill` plugin is activated */
307304
onSpill(evt: SortableEvent) {
308305
const { removeOnSpill, revertOnSpill } = this.props;
309306
if (removeOnSpill && !revertOnSpill) removeNode(evt.item);
@@ -330,14 +327,16 @@ Please read the updated README.md at https://github.com/SortableJS/react-sortabl
330327
}
331328
}
332329

333-
// everything below this point can be removes
330+
// everything below this point can be removed
334331
// once @types has been merged. PR submited
335332
interface MultiIndices {
336333
multiDragElement: HTMLElement;
337334
index: number;
338335
}
339336

340337
export interface MultiDragEvent extends SortableEvent {
338+
// @todo - add this to @types
339+
clones: HTMLElement[];
341340
oldIndicies: MultiIndices[];
342341
newIndicies: MultiIndices[];
343342
swapItem: HTMLElement | null;

0 commit comments

Comments
 (0)
0