Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
bsholmes committed Dec 22, 2023
1 parent ff644f3 commit 008cc16
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions src/components/Table/GridTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -303,12 +303,13 @@ export function GridTable<R extends Kinded, X extends Only<GridTableXss, X> = an
visibleRows.forEach((rs) => {
// only pass through events if the row is draggable and the user has provided a callback
const dragEventHandler = (callback: OnRowDragEvent<R> | undefined) => {
return rs.row.draggable && callback ?
(evt: DragEventType) => {
if (rs.row.draggable && droppedCallback && callback) {
callback({ ...rs.row }, evt);
}
} : undefined
return rs.row.draggable && callback
? (evt: DragEventType) => {
if (rs.row.draggable && droppedCallback && callback) {
callback({ ...rs.row }, evt);
}
}
: undefined;
};

const onDragStart = (row: GridDataRow<R>, evt: DragEventType) => {
Expand Down

0 comments on commit 008cc16

Please sign in to comment.