Skip to content

Commit 38378b0

Browse files
bjoe87Brett Joe
andauthored
fix: onColumnSizingChange does not return correct value when react strictmode is not used (#4573)
* Fix issue where onColumnSizingChange does not return any values when react.strictmode is not used * change newColumnSizing from let to const Co-authored-by: Brett Joe <brettjoe@Bretts-MacBook-Pro.local>
1 parent 0a9e808 commit 38378b0

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

packages/table-core/src/features/ColumnSizing.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,8 @@ export const ColumnSizing: TableFeature = {
218218
? Math.round(e.touches[0]!.clientX)
219219
: (e as MouseEvent).clientX
220220

221+
const newColumnSizing: ColumnSizingState = {}
222+
221223
const updateOffset = (
222224
eventType: 'move' | 'end',
223225
clientXPos?: number
@@ -226,8 +228,6 @@ export const ColumnSizing: TableFeature = {
226228
return
227229
}
228230

229-
let newColumnSizing: ColumnSizingState = {}
230-
231231
table.setColumnSizingInfo(old => {
232232
const deltaOffset = clientXPos - (old?.startOffset ?? 0)
233233
const deltaPercentage = Math.max(

0 commit comments

Comments
 (0)