Skip to content

Commit

Permalink
bug: do not fail on hidden columns dragging
Browse files Browse the repository at this point in the history
  • Loading branch information
Domino987 committed Apr 25, 2022
1 parent 273330b commit 5966ee3
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions src/components/MTableHeader/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,16 +45,18 @@ export function MTableHeader({ onColumnResized, columns, ...props }) {
}

setLastX(startX);
const nextColumn = displayingColumns[nextColIndex];
setResizing({
colIndex,
nextColIndex,
lastColData: { ...columnDef.tableData, width: currentWidth },
...(nextColIndex && {
lastNextColData: {
...displayingColumns[nextColIndex].tableData,
width: nextWidth
}
}),
...(nextColIndex &&
nextColumn && {
lastNextColData: {
...nextColumn.tableData,
width: nextWidth
}
}),
initialColWidths,
startX
});
Expand Down

0 comments on commit 5966ee3

Please sign in to comment.