@tanstack/table-core 8.9.7 → 8.9.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/lib/core/cell.js +1 -1
- package/build/lib/core/cell.js.map +1 -1
- package/build/lib/core/column.js +3 -3
- package/build/lib/core/column.js.map +1 -1
- package/build/lib/core/headers.js +182 -181
- package/build/lib/core/headers.js.map +1 -1
- package/build/lib/core/row.js +1 -1
- package/build/lib/core/row.js.map +1 -1
- package/build/lib/core/table.js +4 -3
- package/build/lib/core/table.js.map +1 -1
- package/build/lib/features/ColumnSizing.js +173 -179
- package/build/lib/features/ColumnSizing.js.map +1 -1
- package/build/lib/features/Expanding.js +119 -123
- package/build/lib/features/Expanding.js.map +1 -1
- package/build/lib/features/Filters.js +157 -165
- package/build/lib/features/Filters.js.map +1 -1
- package/build/lib/features/Grouping.js +71 -79
- package/build/lib/features/Grouping.js.map +1 -1
- package/build/lib/features/Ordering.js +32 -34
- package/build/lib/features/Ordering.js.map +1 -1
- package/build/lib/features/Pagination.js +112 -114
- package/build/lib/features/Pagination.js.map +1 -1
- package/build/lib/features/Pinning.js +120 -126
- package/build/lib/features/Pinning.js.map +1 -1
- package/build/lib/features/RowSelection.js +245 -247
- package/build/lib/features/RowSelection.js.map +1 -1
- package/build/lib/features/Sorting.js +163 -167
- package/build/lib/features/Sorting.js.map +1 -1
- package/build/lib/features/Visibility.js +60 -66
- package/build/lib/features/Visibility.js.map +1 -1
- package/build/lib/index.esm.js +1469 -1515
- package/build/lib/index.esm.js.map +1 -1
- package/build/lib/index.mjs +1469 -1515
- package/build/lib/index.mjs.map +1 -1
- package/build/umd/index.development.js +1469 -1515
- package/build/umd/index.development.js.map +1 -1
- package/build/umd/index.production.js +1 -1
- package/build/umd/index.production.js.map +1 -1
- package/package.json +1 -1
- package/src/core/cell.ts +5 -8
- package/src/core/column.ts +3 -3
- package/src/core/headers.ts +264 -280
- package/src/core/row.ts +1 -1
- package/src/core/table.ts +4 -3
- package/src/features/ColumnSizing.ts +220 -231
- package/src/features/Expanding.ts +132 -140
- package/src/features/Filters.ts +193 -206
- package/src/features/Grouping.ts +94 -110
- package/src/features/Ordering.ts +48 -51
- package/src/features/Pagination.ts +150 -154
- package/src/features/Pinning.ts +158 -178
- package/src/features/RowSelection.ts +280 -286
- package/src/features/Sorting.ts +196 -206
- package/src/features/Visibility.ts +98 -107
|
@@ -110,281 +110,270 @@ export const ColumnSizing: TableFeature = {
|
|
|
110
110
|
createColumn: <TData extends RowData, TValue>(
|
|
111
111
|
column: Column<TData, TValue>,
|
|
112
112
|
table: Table<TData>
|
|
113
|
-
):
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
: table.getRightVisibleLeafColumns()
|
|
113
|
+
): void => {
|
|
114
|
+
column.getSize = () => {
|
|
115
|
+
const columnSize = table.getState().columnSizing[column.id]
|
|
116
|
+
|
|
117
|
+
return Math.min(
|
|
118
|
+
Math.max(
|
|
119
|
+
column.columnDef.minSize ?? defaultColumnSizing.minSize,
|
|
120
|
+
columnSize ?? column.columnDef.size ?? defaultColumnSizing.size
|
|
121
|
+
),
|
|
122
|
+
column.columnDef.maxSize ?? defaultColumnSizing.maxSize
|
|
123
|
+
)
|
|
124
|
+
}
|
|
125
|
+
column.getStart = position => {
|
|
126
|
+
const columns = !position
|
|
127
|
+
? table.getVisibleLeafColumns()
|
|
128
|
+
: position === 'left'
|
|
129
|
+
? table.getLeftVisibleLeafColumns()
|
|
130
|
+
: table.getRightVisibleLeafColumns()
|
|
132
131
|
|
|
133
|
-
|
|
132
|
+
const index = columns.findIndex(d => d.id === column.id)
|
|
134
133
|
|
|
135
|
-
|
|
136
|
-
|
|
134
|
+
if (index > 0) {
|
|
135
|
+
const prevSiblingColumn = columns[index - 1]!
|
|
137
136
|
|
|
138
|
-
return (
|
|
139
|
-
prevSiblingColumn.getStart(position) + prevSiblingColumn.getSize()
|
|
140
|
-
)
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
return 0
|
|
144
|
-
},
|
|
145
|
-
resetSize: () => {
|
|
146
|
-
table.setColumnSizing(({ [column.id]: _, ...rest }) => {
|
|
147
|
-
return rest
|
|
148
|
-
})
|
|
149
|
-
},
|
|
150
|
-
getCanResize: () => {
|
|
151
137
|
return (
|
|
152
|
-
(
|
|
153
|
-
(table.options.enableColumnResizing ?? true)
|
|
138
|
+
prevSiblingColumn.getStart(position) + prevSiblingColumn.getSize()
|
|
154
139
|
)
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
return 0
|
|
143
|
+
}
|
|
144
|
+
column.resetSize = () => {
|
|
145
|
+
table.setColumnSizing(({ [column.id]: _, ...rest }) => {
|
|
146
|
+
return rest
|
|
147
|
+
})
|
|
148
|
+
}
|
|
149
|
+
column.getCanResize = () => {
|
|
150
|
+
return (
|
|
151
|
+
(column.columnDef.enableResizing ?? true) &&
|
|
152
|
+
(table.options.enableColumnResizing ?? true)
|
|
153
|
+
)
|
|
154
|
+
}
|
|
155
|
+
column.getIsResizing = () => {
|
|
156
|
+
return table.getState().columnSizingInfo.isResizingColumn === column.id
|
|
159
157
|
}
|
|
160
158
|
},
|
|
161
159
|
|
|
162
160
|
createHeader: <TData extends RowData, TValue>(
|
|
163
161
|
header: Header<TData, TValue>,
|
|
164
162
|
table: Table<TData>
|
|
165
|
-
):
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
sum += header.column.getSize() ?? 0
|
|
175
|
-
}
|
|
163
|
+
): void => {
|
|
164
|
+
header.getSize = () => {
|
|
165
|
+
let sum = 0
|
|
166
|
+
|
|
167
|
+
const recurse = (header: Header<TData, TValue>) => {
|
|
168
|
+
if (header.subHeaders.length) {
|
|
169
|
+
header.subHeaders.forEach(recurse)
|
|
170
|
+
} else {
|
|
171
|
+
sum += header.column.getSize() ?? 0
|
|
176
172
|
}
|
|
173
|
+
}
|
|
177
174
|
|
|
178
|
-
|
|
175
|
+
recurse(header)
|
|
179
176
|
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
177
|
+
return sum
|
|
178
|
+
}
|
|
179
|
+
header.getStart = () => {
|
|
180
|
+
if (header.index > 0) {
|
|
181
|
+
const prevSiblingHeader = header.headerGroup.headers[header.index - 1]!
|
|
182
|
+
return prevSiblingHeader.getStart() + prevSiblingHeader.getSize()
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
return 0
|
|
186
|
+
}
|
|
187
|
+
header.getResizeHandler = () => {
|
|
188
|
+
const column = table.getColumn(header.column.id)
|
|
189
|
+
const canResize = column?.getCanResize()
|
|
190
|
+
|
|
191
|
+
return (e: unknown) => {
|
|
192
|
+
if (!column || !canResize) {
|
|
193
|
+
return
|
|
187
194
|
}
|
|
188
195
|
|
|
189
|
-
|
|
190
|
-
},
|
|
191
|
-
getResizeHandler: () => {
|
|
192
|
-
const column = table.getColumn(header.column.id)
|
|
193
|
-
const canResize = column?.getCanResize()
|
|
196
|
+
;(e as any).persist?.()
|
|
194
197
|
|
|
195
|
-
|
|
196
|
-
|
|
198
|
+
if (isTouchStartEvent(e)) {
|
|
199
|
+
// lets not respond to multiple touches (e.g. 2 or 3 fingers)
|
|
200
|
+
if (e.touches && e.touches.length > 1) {
|
|
197
201
|
return
|
|
198
202
|
}
|
|
203
|
+
}
|
|
199
204
|
|
|
200
|
-
|
|
205
|
+
const startSize = header.getSize()
|
|
201
206
|
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
return
|
|
206
|
-
}
|
|
207
|
-
}
|
|
207
|
+
const columnSizingStart: [string, number][] = header
|
|
208
|
+
? header.getLeafHeaders().map(d => [d.column.id, d.column.getSize()])
|
|
209
|
+
: [[column.id, column.getSize()]]
|
|
208
210
|
|
|
209
|
-
|
|
211
|
+
const clientX = isTouchStartEvent(e)
|
|
212
|
+
? Math.round(e.touches[0]!.clientX)
|
|
213
|
+
: (e as MouseEvent).clientX
|
|
210
214
|
|
|
211
|
-
|
|
212
|
-
? header
|
|
213
|
-
.getLeafHeaders()
|
|
214
|
-
.map(d => [d.column.id, d.column.getSize()])
|
|
215
|
-
: [[column.id, column.getSize()]]
|
|
215
|
+
const newColumnSizing: ColumnSizingState = {}
|
|
216
216
|
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
217
|
+
const updateOffset = (
|
|
218
|
+
eventType: 'move' | 'end',
|
|
219
|
+
clientXPos?: number
|
|
220
|
+
) => {
|
|
221
|
+
if (typeof clientXPos !== 'number') {
|
|
222
|
+
return
|
|
223
|
+
}
|
|
222
224
|
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
}
|
|
225
|
+
table.setColumnSizingInfo(old => {
|
|
226
|
+
const deltaOffset = clientXPos - (old?.startOffset ?? 0)
|
|
227
|
+
const deltaPercentage = Math.max(
|
|
228
|
+
deltaOffset / (old?.startSize ?? 0),
|
|
229
|
+
-0.999999
|
|
230
|
+
)
|
|
230
231
|
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
)
|
|
237
|
-
|
|
238
|
-
old.columnSizingStart.forEach(([columnId, headerSize]) => {
|
|
239
|
-
newColumnSizing[columnId] =
|
|
240
|
-
Math.round(
|
|
241
|
-
Math.max(headerSize + headerSize * deltaPercentage, 0) * 100
|
|
242
|
-
) / 100
|
|
243
|
-
})
|
|
244
|
-
|
|
245
|
-
return {
|
|
246
|
-
...old,
|
|
247
|
-
deltaOffset,
|
|
248
|
-
deltaPercentage,
|
|
249
|
-
}
|
|
232
|
+
old.columnSizingStart.forEach(([columnId, headerSize]) => {
|
|
233
|
+
newColumnSizing[columnId] =
|
|
234
|
+
Math.round(
|
|
235
|
+
Math.max(headerSize + headerSize * deltaPercentage, 0) * 100
|
|
236
|
+
) / 100
|
|
250
237
|
})
|
|
251
238
|
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
table.setColumnSizing(old => ({
|
|
257
|
-
...old,
|
|
258
|
-
...newColumnSizing,
|
|
259
|
-
}))
|
|
239
|
+
return {
|
|
240
|
+
...old,
|
|
241
|
+
deltaOffset,
|
|
242
|
+
deltaPercentage,
|
|
260
243
|
}
|
|
261
|
-
}
|
|
262
|
-
|
|
263
|
-
const onMove = (clientXPos?: number) =>
|
|
264
|
-
updateOffset('move', clientXPos)
|
|
244
|
+
})
|
|
265
245
|
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
246
|
+
if (
|
|
247
|
+
table.options.columnResizeMode === 'onChange' ||
|
|
248
|
+
eventType === 'end'
|
|
249
|
+
) {
|
|
250
|
+
table.setColumnSizing(old => ({
|
|
270
251
|
...old,
|
|
271
|
-
|
|
272
|
-
startOffset: null,
|
|
273
|
-
startSize: null,
|
|
274
|
-
deltaOffset: null,
|
|
275
|
-
deltaPercentage: null,
|
|
276
|
-
columnSizingStart: [],
|
|
252
|
+
...newColumnSizing,
|
|
277
253
|
}))
|
|
278
254
|
}
|
|
255
|
+
}
|
|
279
256
|
|
|
280
|
-
|
|
281
|
-
moveHandler: (e: MouseEvent) => onMove(e.clientX),
|
|
282
|
-
upHandler: (e: MouseEvent) => {
|
|
283
|
-
document.removeEventListener('mousemove', mouseEvents.moveHandler)
|
|
284
|
-
document.removeEventListener('mouseup', mouseEvents.upHandler)
|
|
285
|
-
onEnd(e.clientX)
|
|
286
|
-
},
|
|
287
|
-
}
|
|
288
|
-
|
|
289
|
-
const touchEvents = {
|
|
290
|
-
moveHandler: (e: TouchEvent) => {
|
|
291
|
-
if (e.cancelable) {
|
|
292
|
-
e.preventDefault()
|
|
293
|
-
e.stopPropagation()
|
|
294
|
-
}
|
|
295
|
-
onMove(e.touches[0]!.clientX)
|
|
296
|
-
return false
|
|
297
|
-
},
|
|
298
|
-
upHandler: (e: TouchEvent) => {
|
|
299
|
-
document.removeEventListener('touchmove', touchEvents.moveHandler)
|
|
300
|
-
document.removeEventListener('touchend', touchEvents.upHandler)
|
|
301
|
-
if (e.cancelable) {
|
|
302
|
-
e.preventDefault()
|
|
303
|
-
e.stopPropagation()
|
|
304
|
-
}
|
|
305
|
-
onEnd(e.touches[0]?.clientX)
|
|
306
|
-
},
|
|
307
|
-
}
|
|
257
|
+
const onMove = (clientXPos?: number) => updateOffset('move', clientXPos)
|
|
308
258
|
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
: false
|
|
312
|
-
|
|
313
|
-
if (isTouchStartEvent(e)) {
|
|
314
|
-
document.addEventListener(
|
|
315
|
-
'touchmove',
|
|
316
|
-
touchEvents.moveHandler,
|
|
317
|
-
passiveIfSupported
|
|
318
|
-
)
|
|
319
|
-
document.addEventListener(
|
|
320
|
-
'touchend',
|
|
321
|
-
touchEvents.upHandler,
|
|
322
|
-
passiveIfSupported
|
|
323
|
-
)
|
|
324
|
-
} else {
|
|
325
|
-
document.addEventListener(
|
|
326
|
-
'mousemove',
|
|
327
|
-
mouseEvents.moveHandler,
|
|
328
|
-
passiveIfSupported
|
|
329
|
-
)
|
|
330
|
-
document.addEventListener(
|
|
331
|
-
'mouseup',
|
|
332
|
-
mouseEvents.upHandler,
|
|
333
|
-
passiveIfSupported
|
|
334
|
-
)
|
|
335
|
-
}
|
|
259
|
+
const onEnd = (clientXPos?: number) => {
|
|
260
|
+
updateOffset('end', clientXPos)
|
|
336
261
|
|
|
337
262
|
table.setColumnSizingInfo(old => ({
|
|
338
263
|
...old,
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
264
|
+
isResizingColumn: false,
|
|
265
|
+
startOffset: null,
|
|
266
|
+
startSize: null,
|
|
267
|
+
deltaOffset: null,
|
|
268
|
+
deltaPercentage: null,
|
|
269
|
+
columnSizingStart: [],
|
|
345
270
|
}))
|
|
346
271
|
}
|
|
347
|
-
|
|
272
|
+
|
|
273
|
+
const mouseEvents = {
|
|
274
|
+
moveHandler: (e: MouseEvent) => onMove(e.clientX),
|
|
275
|
+
upHandler: (e: MouseEvent) => {
|
|
276
|
+
document.removeEventListener('mousemove', mouseEvents.moveHandler)
|
|
277
|
+
document.removeEventListener('mouseup', mouseEvents.upHandler)
|
|
278
|
+
onEnd(e.clientX)
|
|
279
|
+
},
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
const touchEvents = {
|
|
283
|
+
moveHandler: (e: TouchEvent) => {
|
|
284
|
+
if (e.cancelable) {
|
|
285
|
+
e.preventDefault()
|
|
286
|
+
e.stopPropagation()
|
|
287
|
+
}
|
|
288
|
+
onMove(e.touches[0]!.clientX)
|
|
289
|
+
return false
|
|
290
|
+
},
|
|
291
|
+
upHandler: (e: TouchEvent) => {
|
|
292
|
+
document.removeEventListener('touchmove', touchEvents.moveHandler)
|
|
293
|
+
document.removeEventListener('touchend', touchEvents.upHandler)
|
|
294
|
+
if (e.cancelable) {
|
|
295
|
+
e.preventDefault()
|
|
296
|
+
e.stopPropagation()
|
|
297
|
+
}
|
|
298
|
+
onEnd(e.touches[0]?.clientX)
|
|
299
|
+
},
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
const passiveIfSupported = passiveEventSupported()
|
|
303
|
+
? { passive: false }
|
|
304
|
+
: false
|
|
305
|
+
|
|
306
|
+
if (isTouchStartEvent(e)) {
|
|
307
|
+
document.addEventListener(
|
|
308
|
+
'touchmove',
|
|
309
|
+
touchEvents.moveHandler,
|
|
310
|
+
passiveIfSupported
|
|
311
|
+
)
|
|
312
|
+
document.addEventListener(
|
|
313
|
+
'touchend',
|
|
314
|
+
touchEvents.upHandler,
|
|
315
|
+
passiveIfSupported
|
|
316
|
+
)
|
|
317
|
+
} else {
|
|
318
|
+
document.addEventListener(
|
|
319
|
+
'mousemove',
|
|
320
|
+
mouseEvents.moveHandler,
|
|
321
|
+
passiveIfSupported
|
|
322
|
+
)
|
|
323
|
+
document.addEventListener(
|
|
324
|
+
'mouseup',
|
|
325
|
+
mouseEvents.upHandler,
|
|
326
|
+
passiveIfSupported
|
|
327
|
+
)
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
table.setColumnSizingInfo(old => ({
|
|
331
|
+
...old,
|
|
332
|
+
startOffset: clientX,
|
|
333
|
+
startSize,
|
|
334
|
+
deltaOffset: 0,
|
|
335
|
+
deltaPercentage: 0,
|
|
336
|
+
columnSizingStart,
|
|
337
|
+
isResizingColumn: column.id,
|
|
338
|
+
}))
|
|
339
|
+
}
|
|
348
340
|
}
|
|
349
341
|
},
|
|
350
342
|
|
|
351
|
-
createTable: <TData extends RowData>(
|
|
352
|
-
table
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
getDefaultColumnSizingInfoState()
|
|
369
|
-
)
|
|
370
|
-
},
|
|
371
|
-
getTotalSize: () =>
|
|
372
|
-
table.getHeaderGroups()[0]?.headers.reduce((sum, header) => {
|
|
373
|
-
return sum + header.getSize()
|
|
374
|
-
}, 0) ?? 0,
|
|
375
|
-
getLeftTotalSize: () =>
|
|
376
|
-
table.getLeftHeaderGroups()[0]?.headers.reduce((sum, header) => {
|
|
377
|
-
return sum + header.getSize()
|
|
378
|
-
}, 0) ?? 0,
|
|
379
|
-
getCenterTotalSize: () =>
|
|
380
|
-
table.getCenterHeaderGroups()[0]?.headers.reduce((sum, header) => {
|
|
381
|
-
return sum + header.getSize()
|
|
382
|
-
}, 0) ?? 0,
|
|
383
|
-
getRightTotalSize: () =>
|
|
384
|
-
table.getRightHeaderGroups()[0]?.headers.reduce((sum, header) => {
|
|
385
|
-
return sum + header.getSize()
|
|
386
|
-
}, 0) ?? 0,
|
|
343
|
+
createTable: <TData extends RowData>(table: Table<TData>): void => {
|
|
344
|
+
table.setColumnSizing = updater =>
|
|
345
|
+
table.options.onColumnSizingChange?.(updater)
|
|
346
|
+
table.setColumnSizingInfo = updater =>
|
|
347
|
+
table.options.onColumnSizingInfoChange?.(updater)
|
|
348
|
+
table.resetColumnSizing = defaultState => {
|
|
349
|
+
table.setColumnSizing(
|
|
350
|
+
defaultState ? {} : table.initialState.columnSizing ?? {}
|
|
351
|
+
)
|
|
352
|
+
}
|
|
353
|
+
table.resetHeaderSizeInfo = defaultState => {
|
|
354
|
+
table.setColumnSizingInfo(
|
|
355
|
+
defaultState
|
|
356
|
+
? getDefaultColumnSizingInfoState()
|
|
357
|
+
: table.initialState.columnSizingInfo ??
|
|
358
|
+
getDefaultColumnSizingInfoState()
|
|
359
|
+
)
|
|
387
360
|
}
|
|
361
|
+
table.getTotalSize = () =>
|
|
362
|
+
table.getHeaderGroups()[0]?.headers.reduce((sum, header) => {
|
|
363
|
+
return sum + header.getSize()
|
|
364
|
+
}, 0) ?? 0
|
|
365
|
+
table.getLeftTotalSize = () =>
|
|
366
|
+
table.getLeftHeaderGroups()[0]?.headers.reduce((sum, header) => {
|
|
367
|
+
return sum + header.getSize()
|
|
368
|
+
}, 0) ?? 0
|
|
369
|
+
table.getCenterTotalSize = () =>
|
|
370
|
+
table.getCenterHeaderGroups()[0]?.headers.reduce((sum, header) => {
|
|
371
|
+
return sum + header.getSize()
|
|
372
|
+
}, 0) ?? 0
|
|
373
|
+
table.getRightTotalSize = () =>
|
|
374
|
+
table.getRightHeaderGroups()[0]?.headers.reduce((sum, header) => {
|
|
375
|
+
return sum + header.getSize()
|
|
376
|
+
}, 0) ?? 0
|
|
388
377
|
},
|
|
389
378
|
}
|
|
390
379
|
|