Skip to content

Commit

Permalink
dedupe
Browse files Browse the repository at this point in the history
  • Loading branch information
amanmahajan7 committed Oct 3, 2023
1 parent 9d3af8c commit 413034f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/DragHandle.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -127,14 +127,15 @@ export default function DragHandle<R, SR>({
const colSpan = column.colSpan?.({ type: 'ROW', row: rows[rowIdx] }) ?? 1;
const style = getCellStyle(column, colSpan);
const { insetInlineStart } = style;
const marginInlineStart = getMarginStart(isLastColumn, columnWidth);

return {
...style,
gridRowStart,
marginInlineStart: insetInlineStart ? undefined : getMarginStart(isLastColumn, columnWidth),
marginInlineStart: insetInlineStart ? undefined : marginInlineStart,
marginBlockStart: getMarginStart(isLastRow, rowHeight),
insetInlineStart: insetInlineStart
? `calc(${insetInlineStart} + ${getMarginStart(isLastColumn, columnWidth)})`
? `calc(${insetInlineStart} + ${marginInlineStart})`
: undefined
};
}
Expand Down

0 comments on commit 413034f

Please sign in to comment.