Skip to content

Commit

Permalink
fix: revert (#4573) (#4606)
Browse files Browse the repository at this point in the history
This reverts commit 38378b0.
  • Loading branch information
KevinVandy committed Dec 13, 2022
1 parent 4575ea6 commit 5020376
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/table-core/src/features/ColumnSizing.ts
Original file line number Diff line number Diff line change
Expand Up @@ -218,8 +218,6 @@ export const ColumnSizing: TableFeature = {
? Math.round(e.touches[0]!.clientX)
: (e as MouseEvent).clientX

const newColumnSizing: ColumnSizingState = {}

const updateOffset = (
eventType: 'move' | 'end',
clientXPos?: number
Expand All @@ -228,6 +226,8 @@ export const ColumnSizing: TableFeature = {
return
}

let newColumnSizing: ColumnSizingState = {}

table.setColumnSizingInfo(old => {
const deltaOffset = clientXPos - (old?.startOffset ?? 0)
const deltaPercentage = Math.max(
Expand Down

2 comments on commit 5020376

@talatkuyuk
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just for curiosity, what happened?

@ftlars
Copy link

@ftlars ftlars commented on 5020376 Jan 5, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@talatkuyuk With previous react-table versions, in some environments passing a handler to onColumnSizingChange would break column sizing. Updating to this react-table version just fixed my problem.

Please sign in to comment.