@infinite-table/infinite-react 9.0.3 → 9.1.1

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/index.dev.mjs CHANGED
@@ -2136,7 +2136,7 @@ function InfiniteTableFooter(props) {
2136
2136
 
2137
2137
  // src/components/InfiniteTable/components/InfiniteTableHeader/InfiniteTableHeaderCell.tsx
2138
2138
  import * as React49 from "react";
2139
- import { useCallback as useCallback22, useContext as useContext10, useEffect as useEffect16, useRef as useRef21 } from "react";
2139
+ import { useCallback as useCallback22, useContext as useContext10, useEffect as useEffect17, useRef as useRef21 } from "react";
2140
2140
  import { createPortal } from "react-dom";
2141
2141
 
2142
2142
  // src/utils/keyMirror.ts
@@ -6290,7 +6290,47 @@ import * as React26 from "react";
6290
6290
 
6291
6291
  // src/components/InfiniteTable/components/InfiniteTableRow/InfiniteTableColumnCell.tsx
6292
6292
  import * as React25 from "react";
6293
- import { useCallback as useCallback14, useContext as useContext6, useMemo as useMemo5, useSyncExternalStore as useSyncExternalStore2 } from "react";
6293
+ import {
6294
+ useCallback as useCallback14,
6295
+ useContext as useContext6,
6296
+ useEffect as useEffect9,
6297
+ useMemo as useMemo5,
6298
+ useReducer as useReducer2,
6299
+ useSyncExternalStore as useSyncExternalStore2
6300
+ } from "react";
6301
+
6302
+ // src/components/InfiniteTable/components/InfiniteTableRow/repaintCellsKey.ts
6303
+ var REPAINT_CELLS_KEY_NO_ROW = Symbol("REPAINT_CELLS_KEY_NO_ROW");
6304
+ function isRepaintCellsKeyFn(repaintCellsKey) {
6305
+ return typeof repaintCellsKey === "function";
6306
+ }
6307
+ function computeRepaintCellsKey(fn, params) {
6308
+ const { column, rowIndex, rowInfoStore, getDataSourceState } = params;
6309
+ const rowInfo = rowInfoStore.getRowInfoAtIndex(rowIndex);
6310
+ if (!rowInfo) {
6311
+ return REPAINT_CELLS_KEY_NO_ROW;
6312
+ }
6313
+ const states = rowInfoStore.getDataSourceStates();
6314
+ return fn({
6315
+ rowInfo,
6316
+ column,
6317
+ dataSourceState: states.dataSourceState ?? getDataSourceState(),
6318
+ previousDataSourceState: states.previousDataSourceState
6319
+ });
6320
+ }
6321
+ function subscribeToRepaintCellsKey(fn, params, onKeyChange) {
6322
+ let lastKey = computeRepaintCellsKey(fn, params);
6323
+ return params.rowInfoStore.subscribeToDataArrayChange(() => {
6324
+ const nextKey = computeRepaintCellsKey(fn, params);
6325
+ if (nextKey === REPAINT_CELLS_KEY_NO_ROW) {
6326
+ return;
6327
+ }
6328
+ if (!Object.is(nextKey, lastKey)) {
6329
+ lastKey = nextKey;
6330
+ onKeyChange();
6331
+ }
6332
+ });
6333
+ }
6294
6334
 
6295
6335
  // src/components/InfiniteTable/components/cell.css.ts
6296
6336
  var ColumnCellCls = "_1eexc2a7 _1eexc2a6";
@@ -7303,6 +7343,21 @@ var defaultRenderSelectionCheckBox = (params) => {
7303
7343
  }
7304
7344
  );
7305
7345
  };
7346
+ function useRepaintCellsKey(params) {
7347
+ const { repaintCellsKey, column, rowIndex, rowInfoStore, getDataSourceState } = params;
7348
+ const [, forceRepaint] = useReducer2((x) => x + 1, 0);
7349
+ const repaintCellsKeyFn = isRepaintCellsKeyFn(repaintCellsKey) ? repaintCellsKey : void 0;
7350
+ useEffect9(() => {
7351
+ if (!repaintCellsKeyFn) {
7352
+ return;
7353
+ }
7354
+ return subscribeToRepaintCellsKey(
7355
+ repaintCellsKeyFn,
7356
+ { column, rowIndex, rowInfoStore, getDataSourceState },
7357
+ forceRepaint
7358
+ );
7359
+ }, [repaintCellsKeyFn, column, rowIndex, rowInfoStore, getDataSourceState]);
7360
+ }
7306
7361
  function InfiniteTableColumnCellFn(props) {
7307
7362
  const {
7308
7363
  dataSourceStatePartialForCell,
@@ -7316,6 +7371,7 @@ function InfiniteTableColumnCellFn(props) {
7316
7371
  computedColumnOrder,
7317
7372
  cellStyle,
7318
7373
  cellClassName,
7374
+ repaintCellsKey,
7319
7375
  rowDetailState,
7320
7376
  width,
7321
7377
  column,
@@ -7352,6 +7408,13 @@ function InfiniteTableColumnCellFn(props) {
7352
7408
  [rowInfoStore, rowIndex]
7353
7409
  )
7354
7410
  );
7411
+ useRepaintCellsKey({
7412
+ repaintCellsKey,
7413
+ column,
7414
+ rowIndex,
7415
+ rowInfoStore,
7416
+ getDataSourceState
7417
+ });
7355
7418
  const isEmptyRowInfo = !rowInfoFromStore;
7356
7419
  const isEmptyColumn = !column;
7357
7420
  const htmlElementRef = React25.useRef(null);
@@ -7876,7 +7939,7 @@ function MenuIcon(props) {
7876
7939
 
7877
7940
  // src/components/InfiniteTable/components/icons/SortIcon/index.tsx
7878
7941
  import * as React28 from "react";
7879
- import { useEffect as useEffect9, useState as useState9 } from "react";
7942
+ import { useEffect as useEffect10, useState as useState9 } from "react";
7880
7943
 
7881
7944
  // src/components/InfiniteTable/components/icons/SortIcon/SortIcon.css.ts
7882
7945
  var SortIconCls = "_1b8djff0 _16lm1iw1p _16lm1iw2f _16lm1iw1 _16lm1iw32";
@@ -7914,7 +7977,7 @@ function SortIcon(props) {
7914
7977
  ...props.lineStyle,
7915
7978
  opacity
7916
7979
  };
7917
- useEffect9(() => {
7980
+ useEffect10(() => {
7918
7981
  const newOpacity = direction != 0 ? 1 : 0;
7919
7982
  if (!rendered && newOpacity) {
7920
7983
  setRendered(true);
@@ -8328,7 +8391,7 @@ function useColumnResizeHandle(column, opts) {
8328
8391
 
8329
8392
  // src/components/InfiniteTable/components/draggable/DragList.tsx
8330
8393
  import * as React31 from "react";
8331
- import { useCallback as useCallback17, useEffect as useEffect10, useState as useState12 } from "react";
8394
+ import { useCallback as useCallback17, useEffect as useEffect11, useState as useState12 } from "react";
8332
8395
 
8333
8396
  // src/components/InfiniteTable/components/draggable/DragList.css.ts
8334
8397
  var DragListRecipe = createRuntimeFn({ defaultClassName: "_16lm1iw3a _16lm1iw1", variantClassNames: { dragging: { true: "_16lm1iwn _16lm1iw1x" } }, defaultVariants: {}, compoundVariants: [] });
@@ -8771,7 +8834,7 @@ function useInteractionTarget(domRef, props) {
8771
8834
  []
8772
8835
  );
8773
8836
  const getInteractionTarget = useLatest(interactionTarget);
8774
- useEffect10(() => {
8837
+ useEffect11(() => {
8775
8838
  return DragManager.on("register", (interactionTarget2) => {
8776
8839
  const { dragListId, acceptDropsFrom, orientation, shouldAcceptDrop } = getProps();
8777
8840
  const interactionTargetData = interactionTarget2.getData();
@@ -8858,7 +8921,7 @@ var DragList = (props) => {
8858
8921
  domRef,
8859
8922
  props
8860
8923
  );
8861
- useEffect10(() => {
8924
+ useEffect11(() => {
8862
8925
  const dragList = document.querySelector(
8863
8926
  `[${DRAG_LIST_ATTRIBUTE}="${props.dragListId}"]`
8864
8927
  );
@@ -8870,7 +8933,7 @@ var DragList = (props) => {
8870
8933
  );
8871
8934
  }
8872
8935
  }, [props.dragListId]);
8873
- useEffect10(() => {
8936
+ useEffect11(() => {
8874
8937
  if (interactionTarget) {
8875
8938
  const dragListId = props.dragListId;
8876
8939
  const removeOnDragStart = interactionTarget.on(
@@ -9368,7 +9431,7 @@ import * as React47 from "react";
9368
9431
 
9369
9432
  // src/components/HeadlessTable/index.tsx
9370
9433
  import * as React41 from "react";
9371
- import { useCallback as useCallback18, useEffect as useEffect14, useRef as useRef18, useState as useState14 } from "react";
9434
+ import { useCallback as useCallback18, useEffect as useEffect15, useRef as useRef18, useState as useState14 } from "react";
9372
9435
 
9373
9436
  // src/components/VirtualList/SpacePlaceholder.tsx
9374
9437
  import * as React33 from "react";
@@ -9403,9 +9466,9 @@ import * as React34 from "react";
9403
9466
  import { useRef as useRef14 } from "react";
9404
9467
 
9405
9468
  // src/components/hooks/useOnScroll.ts
9406
- import { useEffect as useEffect11 } from "react";
9469
+ import { useEffect as useEffect12 } from "react";
9407
9470
  var useOnScroll = (domRef, onScroll) => {
9408
- useEffect11(() => {
9471
+ useEffect12(() => {
9409
9472
  const domNode = domRef?.current;
9410
9473
  const scrollFn = (event) => {
9411
9474
  const node = event.target;
@@ -13158,7 +13221,7 @@ var RawTable = React38.memo(RawTableFn);
13158
13221
 
13159
13222
  // src/components/InfiniteTable/components/ActiveRowIndicator.tsx
13160
13223
  import * as React39 from "react";
13161
- import { useEffect as useEffect12, useLayoutEffect as useLayoutEffect9, useRef as useRef16 } from "react";
13224
+ import { useEffect as useEffect13, useLayoutEffect as useLayoutEffect9, useRef as useRef16 } from "react";
13162
13225
 
13163
13226
  // src/components/InfiniteTable/components/ActiveCellIndicator.css.ts
13164
13227
  var ActiveCellIndicatorRecipe = createRuntimeFn({ defaultClassName: "nxbq1c1 _16lm1iwz _16lm1iw2", variantClassNames: { visible: { true: "nxbq1c3", false: "nxbq1c4" } }, defaultVariants: {}, compoundVariants: [] });
@@ -13207,7 +13270,7 @@ var ActiveRowIndicatorFn = (props) => {
13207
13270
  };
13208
13271
  setInfiniteVarsOnNode(vars, node);
13209
13272
  }, [props.activeRowIndex, brain]);
13210
- useEffect12(() => {
13273
+ useEffect13(() => {
13211
13274
  const updateVars = (scrollPosition) => {
13212
13275
  setInfiniteVarsOnNode(
13213
13276
  {
@@ -13246,7 +13309,7 @@ var ActiveRowIndicator = React39.memo(
13246
13309
 
13247
13310
  // src/components/InfiniteTable/components/ActiveCellIndicator.tsx
13248
13311
  import * as React40 from "react";
13249
- import { useEffect as useEffect13, useLayoutEffect as useLayoutEffect10, useRef as useRef17 } from "react";
13312
+ import { useEffect as useEffect14, useLayoutEffect as useLayoutEffect10, useRef as useRef17 } from "react";
13250
13313
  var { rootClassName: rootClassName7 } = internalProps;
13251
13314
  var baseCls2 = `${rootClassName7}-ActiveCellIndicator`;
13252
13315
  var columnZIndexAtIndex4 = stripVar(InternalVars.columnZIndexAtIndex);
@@ -13277,7 +13340,7 @@ var ActiveCellIndicatorFn = (props) => {
13277
13340
  useLayoutEffect10(() => {
13278
13341
  reposition(brain, props.activeCellIndex, props.rowHeight, domRef);
13279
13342
  }, [props.activeCellIndex, props.rowHeight, brain]);
13280
- useEffect13(() => {
13343
+ useEffect14(() => {
13281
13344
  const removeOnRenderCountChange = brain.onRenderCountChange(() => {
13282
13345
  rerender();
13283
13346
  });
@@ -13368,12 +13431,12 @@ function HeadlessTable(props) {
13368
13431
  width: 0,
13369
13432
  height: 0
13370
13433
  });
13371
- useEffect14(() => {
13434
+ useEffect15(() => {
13372
13435
  if (scrollStopDelay != null) {
13373
13436
  brain.setScrollStopDelay(scrollStopDelay);
13374
13437
  }
13375
13438
  }, [scrollStopDelay, brain]);
13376
- useEffect14(() => {
13439
+ useEffect15(() => {
13377
13440
  const node = domRef.current?.parentNode;
13378
13441
  if (!node) {
13379
13442
  return;
@@ -13409,7 +13472,7 @@ function HeadlessTable(props) {
13409
13472
  },
13410
13473
  [brain, updateDOMTransform]
13411
13474
  );
13412
- useEffect14(() => {
13475
+ useEffect15(() => {
13413
13476
  const removeOnRenderCount = brain.onRenderCountChange(() => {
13414
13477
  setTotalScrollSize(brain.getVirtualizedContentSize());
13415
13478
  });
@@ -13570,7 +13633,7 @@ function assignGroupOffsetsAndComputedWidths(items, groupOffset = 0) {
13570
13633
 
13571
13634
  // src/components/InfiniteTable/components/InfiniteTableHeader/InfiniteTableHeader.tsx
13572
13635
  import * as React46 from "react";
13573
- import { useCallback as useCallback20, useEffect as useEffect15, useMemo as useMemo8, useRef as useRef20 } from "react";
13636
+ import { useCallback as useCallback20, useEffect as useEffect16, useMemo as useMemo8, useRef as useRef20 } from "react";
13574
13637
 
13575
13638
  // src/components/InfiniteTable/components/InfiniteTableHeader/InfiniteTableHeaderGroup.tsx
13576
13639
  import * as React44 from "react";
@@ -13903,7 +13966,7 @@ function InfiniteTableInternalHeaderFn(props) {
13903
13966
  domRef.current.style.transform = `translate3d(-${scrollPosition.scrollLeft}px, 0px, 0px)`;
13904
13967
  }
13905
13968
  }, []);
13906
- useEffect15(() => {
13969
+ useEffect16(() => {
13907
13970
  const removeOnScroll = headerBrain.onScroll(updateDOMTransform);
13908
13971
  updateDOMTransform(
13909
13972
  headerBrain.getScrollPosition() || { scrollLeft: 0, scrollTop: 0 }
@@ -14541,7 +14604,7 @@ function InfiniteTableHeaderCellFn(props) {
14541
14604
  }
14542
14605
  return all;
14543
14606
  };
14544
- useEffect16(() => {
14607
+ useEffect17(() => {
14545
14608
  let clearOnResize = null;
14546
14609
  const node = domRef.current;
14547
14610
  if (onResize && node) {
@@ -14717,7 +14780,7 @@ function useInfiniteHeaderCell() {
14717
14780
 
14718
14781
  // src/components/InfiniteTable/components/InfiniteTableLicenseFooter/index.tsx
14719
14782
  import * as React50 from "react";
14720
- import { useEffect as useEffect17 } from "react";
14783
+ import { useEffect as useEffect18 } from "react";
14721
14784
 
14722
14785
  // src/components/utils/decamelize.ts
14723
14786
  function decamelize(str, options) {
@@ -14774,7 +14837,7 @@ var InfiniteTableLicenseFooter = React50.forwardRef(
14774
14837
  ref.current = node;
14775
14838
  }
14776
14839
  }, []);
14777
- useEffect17(() => {
14840
+ useEffect18(() => {
14778
14841
  const forceStyle = () => {
14779
14842
  setTimeout(() => {
14780
14843
  enforceStyle(domRef.current, defaultStyle);
@@ -20158,9 +20221,22 @@ function deepEqualRowInfo(oldRowInfo, newRowInfo) {
20158
20221
  function createRowInfoStore() {
20159
20222
  let dataArray = [];
20160
20223
  const subscribers = /* @__PURE__ */ new Map();
20224
+ const dataArrayChangeSubscribers = /* @__PURE__ */ new Set();
20225
+ let dataSourceStates = {
20226
+ dataSourceState: void 0,
20227
+ previousDataSourceState: void 0
20228
+ };
20161
20229
  const notifyDataArray = (newDataArray, params) => {
20162
20230
  const oldDataArray = dataArray;
20163
20231
  const marker = params?.marker;
20232
+ const dataArrayChanged = newDataArray !== oldDataArray;
20233
+ const notifyDataArrayChange = dataArrayChanged && dataArrayChangeSubscribers.size > 0;
20234
+ if (notifyDataArrayChange) {
20235
+ dataSourceStates = {
20236
+ dataSourceState: params?.dataSourceState,
20237
+ previousDataSourceState: params?.previousDataSourceState
20238
+ };
20239
+ }
20164
20240
  if (marker) {
20165
20241
  marker.start({
20166
20242
  details: [
@@ -20186,7 +20262,7 @@ function createRowInfoStore() {
20186
20262
  }
20187
20263
  }
20188
20264
  dataArray = newDataArray;
20189
- if (changedIndices.length > 0) {
20265
+ if (changedIndices.length > 0 || notifyDataArrayChange) {
20190
20266
  queueMicrotask(() => {
20191
20267
  for (let i = 0, len = changedIndices.length; i < len; i++) {
20192
20268
  const index = changedIndices[i];
@@ -20197,6 +20273,11 @@ function createRowInfoStore() {
20197
20273
  }
20198
20274
  }
20199
20275
  }
20276
+ if (notifyDataArrayChange) {
20277
+ for (const callback of Array.from(dataArrayChangeSubscribers)) {
20278
+ callback();
20279
+ }
20280
+ }
20200
20281
  });
20201
20282
  }
20202
20283
  if (marker) {
@@ -20231,14 +20312,36 @@ function createRowInfoStore() {
20231
20312
  const getDataArray = () => {
20232
20313
  return dataArray;
20233
20314
  };
20315
+ const subscribeToDataArrayChange = (callback) => {
20316
+ dataArrayChangeSubscribers.add(callback);
20317
+ return () => {
20318
+ dataArrayChangeSubscribers.delete(callback);
20319
+ if (dataArrayChangeSubscribers.size === 0) {
20320
+ dataSourceStates = {
20321
+ dataSourceState: void 0,
20322
+ previousDataSourceState: void 0
20323
+ };
20324
+ }
20325
+ };
20326
+ };
20327
+ const getDataSourceStates = () => {
20328
+ return dataSourceStates;
20329
+ };
20234
20330
  const clear = () => {
20235
20331
  dataArray = [];
20236
20332
  subscribers.clear();
20333
+ dataArrayChangeSubscribers.clear();
20334
+ dataSourceStates = {
20335
+ dataSourceState: void 0,
20336
+ previousDataSourceState: void 0
20337
+ };
20237
20338
  };
20238
20339
  return {
20239
20340
  notifyDataArray,
20240
20341
  getRowInfoAtIndex,
20241
20342
  subscribeToRowIndex,
20343
+ subscribeToDataArrayChange,
20344
+ getDataSourceStates,
20242
20345
  getDataArray,
20243
20346
  clear
20244
20347
  };
@@ -21922,7 +22025,9 @@ function concludeReducer(params) {
21922
22025
  };
21923
22026
  }
21924
22027
  state.rowInfoStore.notifyDataArray(rowInfoDataArray, {
21925
- marker: debugId ? getMarker(debugId).track.DataSource.label.DiffRowInfoInStore : void 0
22028
+ marker: debugId ? getMarker(debugId).track.DataSource.label.DiffRowInfoInStore : void 0,
22029
+ dataSourceState: state,
22030
+ previousDataSourceState: previousState
21926
22031
  });
21927
22032
  if (rootMarker) {
21928
22033
  rootMarker?.track.DataSource.label.PrepareData.end({
@@ -22320,6 +22425,40 @@ function lazyLoadRange(options, cache) {
22320
22425
  }, initialPromise);
22321
22426
  }
22322
22427
 
22428
+ // src/components/InfiniteTable/utils/getEditingCellContext.ts
22429
+ function resolveEditingCellRowIndex(context, editingCell) {
22430
+ const { rowIndex, primaryKey } = editingCell;
22431
+ const { dataArray } = context.getDataSourceState();
22432
+ if (primaryKey !== void 0) {
22433
+ const indexByKey = context.dataSourceApi.getIndexByPrimaryKey(primaryKey);
22434
+ if (indexByKey !== -1) {
22435
+ return indexByKey;
22436
+ }
22437
+ if (dataArray[rowIndex]?.id !== primaryKey) {
22438
+ return -1;
22439
+ }
22440
+ }
22441
+ return dataArray[rowIndex] ? rowIndex : -1;
22442
+ }
22443
+ function getEditingCellContext(context, editingCell) {
22444
+ const rowIndex = resolveEditingCellRowIndex(context, editingCell);
22445
+ if (rowIndex === -1) {
22446
+ return null;
22447
+ }
22448
+ return getCellContext({
22449
+ ...context,
22450
+ rowIndex,
22451
+ columnId: editingCell.columnId
22452
+ });
22453
+ }
22454
+ function warnEditedRowGone(callbackName, editingCell) {
22455
+ console.warn(
22456
+ `Skipping "${callbackName}": the edited row (primaryKey: ${String(
22457
+ editingCell.primaryKey
22458
+ )}, rowIndex: ${editingCell.rowIndex}) is no longer in the data array.`
22459
+ );
22460
+ }
22461
+
22323
22462
  // src/components/InfiniteTable/api/realignColumnContextMenu.ts
22324
22463
  function realignColumnContextMenu(param) {
22325
22464
  const { getComputed, getState, actions } = param;
@@ -23196,9 +23335,28 @@ var InfiniteTableApiImpl = class {
23196
23335
  waiting: "persist"
23197
23336
  };
23198
23337
  }
23338
+ const rowIndex = resolveEditingCellRowIndex(
23339
+ { ...this.context, api: this },
23340
+ editingCell
23341
+ );
23342
+ if (rowIndex === -1) {
23343
+ const error4 = new Error(
23344
+ `Cannot persist edit: the edited row (primaryKey: ${String(
23345
+ editingCell.primaryKey
23346
+ )}, rowIndex: ${editingCell.rowIndex}) is no longer in the data array.`
23347
+ );
23348
+ this.actions.editingCell = {
23349
+ ...editingCell,
23350
+ active: false,
23351
+ accepted: false,
23352
+ waiting: false,
23353
+ persisted: error4
23354
+ };
23355
+ return Promise.resolve(error4);
23356
+ }
23199
23357
  const params = {
23200
23358
  ...getCellContext({
23201
- rowIndex: editingCell.rowIndex,
23359
+ rowIndex,
23202
23360
  columnId: editingCell.columnId,
23203
23361
  ...this.context,
23204
23362
  api: this
@@ -24103,7 +24261,7 @@ function getImperativeApi(context) {
24103
24261
  }
24104
24262
 
24105
24263
  // src/components/InfiniteTable/hooks/useAutoSizeColumns.ts
24106
- import { useEffect as useEffect18, useRef as useRef23, useState as useState16 } from "react";
24264
+ import { useEffect as useEffect19, useRef as useRef23, useState as useState16 } from "react";
24107
24265
 
24108
24266
  // src/components/InfiniteTable/utils/getColumnContentMaxWidths.ts
24109
24267
  var OFFSET = 10;
@@ -24182,7 +24340,7 @@ function useAutoSizeColumns() {
24182
24340
  const theKey = typeof autoSizeColumnsKey === "object" ? autoSizeColumnsKey.key : autoSizeColumnsKey;
24183
24341
  const getTheKey = useLatest(theKey);
24184
24342
  const lastExecutedIdentifierRef = useRef23(null);
24185
- useEffect18(() => {
24343
+ useEffect19(() => {
24186
24344
  const key = getTheKey();
24187
24345
  if (key == null) {
24188
24346
  return;
@@ -24195,7 +24353,7 @@ function useAutoSizeColumns() {
24195
24353
  };
24196
24354
  return brain.onRenderRangeChange(onChange);
24197
24355
  }, [brain]);
24198
- useEffect18(() => {
24356
+ useEffect19(() => {
24199
24357
  if (theKey == null) {
24200
24358
  return;
24201
24359
  }
@@ -24240,7 +24398,7 @@ function useAutoSizeColumns() {
24240
24398
  }
24241
24399
 
24242
24400
  // src/components/InfiniteTable/hooks/useComputed.ts
24243
- import { useEffect as useEffect24, useMemo as useMemo16, useState as useState20 } from "react";
24401
+ import { useEffect as useEffect25, useMemo as useMemo16, useState as useState20 } from "react";
24244
24402
 
24245
24403
  // src/components/InfiniteTable/utils/MultiCellSelector.ts
24246
24404
  var MultiCellSelector = class {
@@ -24481,7 +24639,7 @@ function useDataSourceState(selector2) {
24481
24639
  // src/components/DataSource/privateHooks/useDataSource.tsx
24482
24640
  import React52, {
24483
24641
  useCallback as useCallback24,
24484
- useEffect as useEffect21,
24642
+ useEffect as useEffect22,
24485
24643
  useLayoutEffect as useLayoutEffect12,
24486
24644
  useState as useState18
24487
24645
  } from "react";
@@ -24492,10 +24650,10 @@ function createDataSourceStore() {
24492
24650
  }
24493
24651
 
24494
24652
  // src/components/DataSource/privateHooks/useLoadData.ts
24495
- import { useEffect as useEffect20, useMemo as useMemo11, useRef as useRef25, useState as useState17 } from "react";
24653
+ import { useEffect as useEffect21, useMemo as useMemo11, useRef as useRef25, useState as useState17 } from "react";
24496
24654
 
24497
24655
  // src/components/hooks/useEffectWithChanges.ts
24498
- import { useEffect as useEffect19, useLayoutEffect as useLayoutEffect11, useRef as useRef24 } from "react";
24656
+ import { useEffect as useEffect20, useLayoutEffect as useLayoutEffect11, useRef as useRef24 } from "react";
24499
24657
  function useEffectWithChanges(fn, deps) {
24500
24658
  const prevRef = useRef24({});
24501
24659
  const oldValuesRef = useRef24({});
@@ -24513,7 +24671,7 @@ function useEffectWithChanges(fn, deps) {
24513
24671
  }
24514
24672
  }
24515
24673
  prevRef.current = deps;
24516
- useEffect19(() => {
24674
+ useEffect20(() => {
24517
24675
  const changes2 = changesRef.current;
24518
24676
  let result = void 0;
24519
24677
  if (Object.keys(changes2).length !== 0) {
@@ -24559,7 +24717,7 @@ function useEffectWithObject(fn, deps) {
24559
24717
  useEffectDeps.push(deps[k]);
24560
24718
  }
24561
24719
  }
24562
- useEffect19(fn, useEffectDeps);
24720
+ useEffect20(fn, useEffectDeps);
24563
24721
  }
24564
24722
 
24565
24723
  // src/components/InfiniteTable/errorCodes.ts
@@ -24730,7 +24888,7 @@ function useLoadData(options) {
24730
24888
  horizontal: false
24731
24889
  });
24732
24890
  const scrollbarsRef = useRef25(scrollbars);
24733
- useEffect20(() => {
24891
+ useEffect21(() => {
24734
24892
  notifyScrollbarsChange.onChange((scrollbars2) => {
24735
24893
  if (!scrollbars2) {
24736
24894
  return;
@@ -24740,7 +24898,7 @@ function useLoadData(options) {
24740
24898
  });
24741
24899
  return () => notifyScrollbarsChange.destroy();
24742
24900
  }, [notifyScrollbarsChange]);
24743
- useEffect20(() => {
24901
+ useEffect21(() => {
24744
24902
  if (!livePagination) {
24745
24903
  return;
24746
24904
  }
@@ -24753,7 +24911,7 @@ function useLoadData(options) {
24753
24911
  });
24754
24912
  return () => cancelAnimationFrame(frameId);
24755
24913
  }, [livePaginationCursor]);
24756
- useEffect20(() => {
24914
+ useEffect21(() => {
24757
24915
  if (!livePagination || livePaginationCursor !== void 0) {
24758
24916
  return;
24759
24917
  }
@@ -24766,7 +24924,7 @@ function useLoadData(options) {
24766
24924
  });
24767
24925
  return () => cancelAnimationFrame(frameId);
24768
24926
  }, [dataArray.length, livePaginationCursor]);
24769
- useEffect20(() => {
24927
+ useEffect21(() => {
24770
24928
  const state = getDataSourceState();
24771
24929
  const { livePaginationCursor: livePaginationCursor2, livePagination: livePagination2, dataArray: dataArray2 } = state;
24772
24930
  if (!scrollbars.vertical && livePagination2) {
@@ -24900,7 +25058,7 @@ function useLoadData(options) {
24900
25058
  }
24901
25059
  function useLazyLoadRange(options, dependencies) {
24902
25060
  const { getDataSourceState, dataSourceActions, dataSourceState } = options;
24903
- useEffect20(() => {
25061
+ useEffect21(() => {
24904
25062
  dataSourceActions.lazyLoadCacheOfLoadedBatches = new DeepMap();
24905
25063
  }, [dataSourceState.data, dataSourceState.dataParams]);
24906
25064
  const {
@@ -24981,7 +25139,7 @@ function useLazyLoadRange(options, dependencies) {
24981
25139
  groupRowsState
24982
25140
  }
24983
25141
  );
24984
- useEffect20(() => {
25142
+ useEffect21(() => {
24985
25143
  if (lazyLoadBatchSize && lazyLoadBatchSize > 0) {
24986
25144
  debouncedLoadRange();
24987
25145
  }
@@ -25072,7 +25230,7 @@ function useDataSourceInternal(props) {
25072
25230
  dataSourceActions,
25073
25231
  getDataSourceState
25074
25232
  });
25075
- useEffect21(() => {
25233
+ useEffect22(() => {
25076
25234
  dataSourceState.onDataArrayChange?.(
25077
25235
  dataSourceState.originalDataArray,
25078
25236
  dataSourceState.originalDataArrayChangedInfo
@@ -25094,7 +25252,7 @@ function useDataSourceInternal(props) {
25094
25252
  });
25095
25253
  }
25096
25254
  }, [dataSourceState.originalDataArrayChangedInfo]);
25097
- useEffect21(() => {
25255
+ useEffect22(() => {
25098
25256
  dataSourceState.onReady?.(dataSourceApi);
25099
25257
  }, []);
25100
25258
  return {
@@ -25332,7 +25490,7 @@ function useColumnSizeFn(columns) {
25332
25490
  }
25333
25491
 
25334
25492
  // src/components/InfiniteTable/hooks/useColumnsWhen.ts
25335
- import { useEffect as useEffect22, useLayoutEffect as useLayoutEffect13, useMemo as useMemo13 } from "react";
25493
+ import { useEffect as useEffect23, useLayoutEffect as useLayoutEffect13, useMemo as useMemo13 } from "react";
25336
25494
 
25337
25495
  // src/components/VirtualBrain/ScrollListener.ts
25338
25496
  var initialScrollPosition = {
@@ -25846,6 +26004,7 @@ var forwardProps4 = (_setupState) => {
25846
26004
  keyboardShortcuts: 1,
25847
26005
  rowStyle: 1,
25848
26006
  cellStyle: 1,
26007
+ repaintCellsKey: 1,
25849
26008
  rowProps: 1,
25850
26009
  rowClassName: 1,
25851
26010
  rowHoverClassName: 1,
@@ -26583,13 +26742,13 @@ function useColumnsWhen(state, actions) {
26583
26742
  pivotTotalColumnPosition,
26584
26743
  pivotGrandTotalColumnPosition
26585
26744
  } = state;
26586
- useEffect22(() => {
26745
+ useEffect23(() => {
26587
26746
  dataSourceActions.generateGroupRows = groupRenderStrategy !== "inline";
26588
26747
  }, [groupRenderStrategy]);
26589
- useEffect22(() => {
26748
+ useEffect23(() => {
26590
26749
  dataSourceActions.pivotTotalColumnPosition = pivotTotalColumnPosition;
26591
26750
  }, [pivotTotalColumnPosition]);
26592
- useEffect22(() => {
26751
+ useEffect23(() => {
26593
26752
  if (pivotGrandTotalColumnPosition != void 0) {
26594
26753
  dataSourceActions.pivotGrandTotalColumnPosition = pivotGrandTotalColumnPosition;
26595
26754
  }
@@ -26670,7 +26829,7 @@ function useColumnsWhenInlineGroupRenderStrategy(groupByMap, state, actions) {
26670
26829
  });
26671
26830
  return Object.keys(computedColumns).length === 0 ? void 0 : computedColumns;
26672
26831
  }
26673
- useEffect22(() => {
26832
+ useEffect23(() => {
26674
26833
  const update = () => {
26675
26834
  componentActions.columnsWhenInlineGroupRenderStrategy = isTree ? void 0 : computeColumnsWhenInlineGroupRenderStrategy(
26676
26835
  columns,
@@ -26705,7 +26864,7 @@ function useColumnsWhenGrouping() {
26705
26864
  getComponentState
26706
26865
  } = useManagedComponentState();
26707
26866
  const toggleGroupRow = useToggleGroupRow();
26708
- useEffect22(() => {
26867
+ useEffect23(() => {
26709
26868
  const update = () => {
26710
26869
  const { columns: columnsWhenGrouping, groupColumnIds } = getColumnsWhenGrouping({
26711
26870
  columns,
@@ -26814,7 +26973,7 @@ function useHideColumns(groupByMap, state, actions) {
26814
26973
  hideEmptyGroupColumns ? groupRowsIndexesInDataArray : null,
26815
26974
  hideEmptyGroupColumns
26816
26975
  ]);
26817
- useEffect22(() => {
26976
+ useEffect23(() => {
26818
26977
  const isGrouped = groupBy.length > 0;
26819
26978
  const currentState = getComponentState();
26820
26979
  const {
@@ -27129,7 +27288,7 @@ function useComputedRowHeight(param) {
27129
27288
  }
27130
27289
 
27131
27290
  // src/components/InfiniteTable/hooks/useScrollbars.ts
27132
- import { useState as useState19, useEffect as useEffect23, useLayoutEffect as useLayoutEffect14 } from "react";
27291
+ import { useState as useState19, useEffect as useEffect24, useLayoutEffect as useLayoutEffect14 } from "react";
27133
27292
  var INITIAL_SCROLLBARS = {
27134
27293
  vertical: false,
27135
27294
  horizontal: false
@@ -27138,7 +27297,7 @@ function useScrollbars(getState) {
27138
27297
  const brain = getState().brain;
27139
27298
  const { getDataSourceState } = useDataSourceStableContext();
27140
27299
  const [scrollbars, setScrollbars] = useState19(INITIAL_SCROLLBARS);
27141
- useEffect23(() => {
27300
+ useEffect24(() => {
27142
27301
  return brain.onRenderCountChange(() => {
27143
27302
  const { scrollTopMax, scrollLeftMax } = brain;
27144
27303
  const vertical = scrollTopMax > 0;
@@ -27249,7 +27408,7 @@ function useComputed(options) {
27249
27408
  }
27250
27409
  });
27251
27410
  });
27252
- useEffect24(() => {
27411
+ useEffect25(() => {
27253
27412
  dataSourceActions.showSeparatePivotColumnForSingleAggregation = showSeparatePivotColumnForSingleAggregation;
27254
27413
  }, [showSeparatePivotColumnForSingleAggregation]);
27255
27414
  const { toggleGroupRow } = useColumnsWhen(state, actions);
@@ -27591,7 +27750,7 @@ var useLicense = (licenseKey = "") => {
27591
27750
  }
27592
27751
  let valid2 = isValidLicense(licenseKey, {
27593
27752
  publishedAt: 1624970570587,
27594
- version: "9.0.3"
27753
+ version: "9.1.1"
27595
27754
  });
27596
27755
  if (!licenseKey && !valid2 && isInsidePlayground) {
27597
27756
  return true;
@@ -27602,18 +27761,18 @@ var useLicense = (licenseKey = "") => {
27602
27761
  };
27603
27762
 
27604
27763
  // src/components/InfiniteTable/hooks/useScrollToActiveCell.ts
27605
- import { useRef as useRef26, useEffect as useEffect25 } from "react";
27764
+ import { useRef as useRef26, useEffect as useEffect26 } from "react";
27606
27765
  var RETRIES = 10;
27607
27766
  function useScrollToActiveCell(activeCellIndex, dataCount, imperativeApi) {
27608
27767
  const didScrollRef = useRef26(false);
27609
27768
  const rafId = useRef26(null);
27610
- useEffect25(() => {
27769
+ useEffect26(() => {
27611
27770
  if (activeCellIndex != null) {
27612
27771
  didScrollRef.current = false;
27613
27772
  cancelRaf(rafId.current);
27614
27773
  }
27615
27774
  }, [activeCellIndex]);
27616
- useEffect25(() => {
27775
+ useEffect26(() => {
27617
27776
  if (activeCellIndex != null && !didScrollRef.current) {
27618
27777
  let tryScroll2 = function(times = 0) {
27619
27778
  times++;
@@ -27641,18 +27800,18 @@ function useScrollToActiveCell(activeCellIndex, dataCount, imperativeApi) {
27641
27800
  }
27642
27801
 
27643
27802
  // src/components/InfiniteTable/hooks/useScrollToActiveRow.ts
27644
- import { useRef as useRef27, useEffect as useEffect26 } from "react";
27803
+ import { useRef as useRef27, useEffect as useEffect27 } from "react";
27645
27804
  var RETRIES2 = 10;
27646
27805
  function useScrollToActiveRow(activeRowIndex, dataCount, imperativeApi) {
27647
27806
  const didScrollRef = useRef27(false);
27648
27807
  const rafId = useRef27(null);
27649
- useEffect26(() => {
27808
+ useEffect27(() => {
27650
27809
  if (activeRowIndex != null) {
27651
27810
  didScrollRef.current = false;
27652
27811
  cancelAnimationFrame(rafId.current);
27653
27812
  }
27654
27813
  }, [activeRowIndex]);
27655
- useEffect26(() => {
27814
+ useEffect27(() => {
27656
27815
  if (activeRowIndex != null && !didScrollRef.current) {
27657
27816
  let tryScroll2 = function(times = 0) {
27658
27817
  times++;
@@ -27683,7 +27842,7 @@ function createInfiniteTableStore() {
27683
27842
  }
27684
27843
 
27685
27844
  // src/components/InfiniteTable/eventHandlers/index.ts
27686
- import { useCallback as useCallback27, useMemo as useMemo18, useEffect as useEffect27 } from "react";
27845
+ import { useCallback as useCallback27, useMemo as useMemo18, useEffect as useEffect28 } from "react";
27687
27846
 
27688
27847
  // src/components/InfiniteTable/eventHandlers/onCellClick.ts
27689
27848
  function onCellClick(context, event) {
@@ -28394,7 +28553,7 @@ function useEventHandlersContext() {
28394
28553
  }
28395
28554
  function handleDOMEvents() {
28396
28555
  const context = useEventHandlersContext();
28397
- useEffect27(() => {
28556
+ useEffect28(() => {
28398
28557
  const removeOnKeyDown = context.getState().keyDown.onChange((event) => {
28399
28558
  onKeyDown(context, event);
28400
28559
  });
@@ -28454,13 +28613,13 @@ function useDOMEventHandlers() {
28454
28613
  }
28455
28614
 
28456
28615
  // src/components/InfiniteTable/hooks/useColumnMenu.ts
28457
- import { useEffect as useEffect31 } from "react";
28616
+ import { useEffect as useEffect32 } from "react";
28458
28617
 
28459
28618
  // src/components/hooks/useOverlay/index.tsx
28460
28619
  import * as React57 from "react";
28461
28620
  import {
28462
28621
  useCallback as useCallback28,
28463
- useEffect as useEffect29,
28622
+ useEffect as useEffect30,
28464
28623
  useLayoutEffect as useLayoutEffect15,
28465
28624
  useState as useState21
28466
28625
  } from "react";
@@ -28683,7 +28842,7 @@ function DefaultOverlayPortal(props) {
28683
28842
  }
28684
28843
  function OverlayContent(props) {
28685
28844
  const nodeRef = React57.useRef(null);
28686
- useEffect29(() => {
28845
+ useEffect30(() => {
28687
28846
  return props.realign.onChange((handle) => {
28688
28847
  if (nodeRef.current && handle) {
28689
28848
  alignNode(nodeRef.current, handle);
@@ -29310,10 +29469,10 @@ function useMenuContext() {
29310
29469
  }
29311
29470
 
29312
29471
  // src/components/hooks/useMounted.ts
29313
- import { useCallback as useCallback29, useEffect as useEffect30, useRef as useRef29 } from "react";
29472
+ import { useCallback as useCallback29, useEffect as useEffect31, useRef as useRef29 } from "react";
29314
29473
  function useMounted() {
29315
29474
  let mountedRef = useRef29(true);
29316
- useEffect30(() => {
29475
+ useEffect31(() => {
29317
29476
  mountedRef.current = true;
29318
29477
  return () => {
29319
29478
  mountedRef.current = false;
@@ -30141,7 +30300,7 @@ function useColumnMenu() {
30141
30300
  } = useOverlay({
30142
30301
  portalContainer: portalDOMRef?.current ?? false
30143
30302
  });
30144
- useEffect31(() => {
30303
+ useEffect32(() => {
30145
30304
  const state = getState();
30146
30305
  return state.onColumnMenuClick.onChange((info) => {
30147
30306
  if (!info) {
@@ -30154,7 +30313,7 @@ function useColumnMenu() {
30154
30313
  actions.columnMenuVisibleForColumnId = info.column.id;
30155
30314
  });
30156
30315
  }, []);
30157
- useEffect31(() => {
30316
+ useEffect32(() => {
30158
30317
  const { columnMenuVisibleForColumnId: columnMenuVisibleForColumnId2, columnMenuTargetRef } = getState();
30159
30318
  if (columnMenuVisibleForColumnId2) {
30160
30319
  let handleMouseDown2 = function(event) {
@@ -30234,7 +30393,7 @@ function FocusDetect() {
30234
30393
  }
30235
30394
 
30236
30395
  // src/components/InfiniteTable/hooks/useEditingCallbackProps.ts
30237
- import { useEffect as useEffect32 } from "react";
30396
+ import { useEffect as useEffect33 } from "react";
30238
30397
  function useOnEditCancelled() {
30239
30398
  const context = useInfiniteTableStableContext();
30240
30399
  const { getState, editingCell } = useInfiniteTableSelector((ctx) => {
@@ -30244,17 +30403,21 @@ function useOnEditCancelled() {
30244
30403
  };
30245
30404
  });
30246
30405
  const cancelled = editingCell && !editingCell.active ? editingCell.cancelled : void 0;
30247
- useEffect32(() => {
30406
+ useEffect33(() => {
30248
30407
  if (cancelled) {
30249
- const { rowIndex, columnId, initialValue } = getState().editingCell;
30250
30408
  const { onEditCancelled } = getState();
30251
- onEditCancelled?.({
30252
- ...getCellContext({
30253
- rowIndex,
30254
- columnId,
30255
- ...context
30256
- }),
30257
- initialValue
30409
+ const editingCell2 = getState().editingCell;
30410
+ if (!onEditCancelled) {
30411
+ return;
30412
+ }
30413
+ const cellContext = getEditingCellContext(context, editingCell2);
30414
+ if (!cellContext) {
30415
+ warnEditedRowGone("onEditCancelled", editingCell2);
30416
+ return;
30417
+ }
30418
+ onEditCancelled({
30419
+ ...cellContext,
30420
+ initialValue: editingCell2.initialValue
30258
30421
  });
30259
30422
  }
30260
30423
  }, [cancelled]);
@@ -30268,19 +30431,23 @@ function useOnEditRejected() {
30268
30431
  };
30269
30432
  });
30270
30433
  const rejected = editingCell && !editingCell.active && editingCell.accepted instanceof Error ? editingCell.accepted : void 0;
30271
- useEffect32(() => {
30434
+ useEffect33(() => {
30272
30435
  if (rejected) {
30273
- const { rowIndex, columnId, value, initialValue } = getState().editingCell;
30274
30436
  const { onEditRejected } = getState();
30275
- onEditRejected?.({
30276
- ...getCellContext({
30277
- rowIndex,
30278
- columnId,
30279
- ...context
30280
- }),
30281
- value,
30437
+ const editingCell2 = getState().editingCell;
30438
+ if (!onEditRejected) {
30439
+ return;
30440
+ }
30441
+ const cellContext = getEditingCellContext(context, editingCell2);
30442
+ if (!cellContext) {
30443
+ warnEditedRowGone("onEditRejected", editingCell2);
30444
+ return;
30445
+ }
30446
+ onEditRejected({
30447
+ ...cellContext,
30448
+ value: editingCell2.value,
30282
30449
  error: rejected,
30283
- initialValue
30450
+ initialValue: editingCell2.initialValue
30284
30451
  });
30285
30452
  }
30286
30453
  }, [rejected]);
@@ -30294,7 +30461,7 @@ function useFocusOnEditStop() {
30294
30461
  });
30295
30462
  const active = editingCell?.active;
30296
30463
  const prevActive = usePrevious(active);
30297
- useEffect32(() => {
30464
+ useEffect33(() => {
30298
30465
  if (!active && prevActive) {
30299
30466
  context.api.focus();
30300
30467
  }
@@ -30309,20 +30476,19 @@ function useOnEditAccepted() {
30309
30476
  };
30310
30477
  });
30311
30478
  const accepted = editingCell && !editingCell.active && !editingCell.cancelled && editingCell.accepted === true;
30312
- useEffect32(() => {
30479
+ useEffect33(() => {
30313
30480
  if (accepted) {
30314
- const { editingCell: editingCell2 } = getState();
30315
- const { value, rowIndex, columnId, initialValue } = editingCell2;
30316
- const editParams = {
30317
- ...getCellContext({
30318
- rowIndex,
30319
- columnId,
30320
- ...context
30321
- }),
30322
- value,
30323
- initialValue
30324
- };
30325
- getState().onEditAccepted?.(editParams);
30481
+ const { onEditAccepted } = getState();
30482
+ const editingCell2 = getState().editingCell;
30483
+ const { value, initialValue } = editingCell2;
30484
+ if (onEditAccepted) {
30485
+ const cellContext = getEditingCellContext(context, editingCell2);
30486
+ if (cellContext) {
30487
+ onEditAccepted({ ...cellContext, value, initialValue });
30488
+ } else {
30489
+ warnEditedRowGone("onEditAccepted", editingCell2);
30490
+ }
30491
+ }
30326
30492
  context.api.persistEdit({ value });
30327
30493
  }
30328
30494
  }, [accepted]);
@@ -30336,21 +30502,25 @@ function useOnEditPersisted() {
30336
30502
  };
30337
30503
  });
30338
30504
  const persisted = editingCell ? editingCell.persisted : void 0;
30339
- useEffect32(() => {
30505
+ useEffect33(() => {
30340
30506
  if (persisted) {
30341
30507
  const { editingCell: editingCell2, onEditPersistError, onEditPersistSuccess } = getState();
30342
30508
  if (!editingCell2) {
30343
30509
  return;
30344
30510
  }
30345
- const { rowIndex, columnId, value, initialValue } = editingCell2;
30511
+ const callbackName = persisted instanceof Error ? "onEditPersistError" : "onEditPersistSuccess";
30512
+ if (!getState()[callbackName]) {
30513
+ return;
30514
+ }
30515
+ const cellContext = getEditingCellContext(context, editingCell2);
30516
+ if (!cellContext) {
30517
+ warnEditedRowGone(callbackName, editingCell2);
30518
+ return;
30519
+ }
30346
30520
  const params = {
30347
- ...getCellContext({
30348
- rowIndex,
30349
- columnId,
30350
- ...context
30351
- }),
30352
- value,
30353
- initialValue
30521
+ ...cellContext,
30522
+ value: editingCell2.value,
30523
+ initialValue: editingCell2.initialValue
30354
30524
  };
30355
30525
  if (persisted instanceof Error) {
30356
30526
  onEditPersistError?.({ ...params, error: persisted });
@@ -30369,7 +30539,7 @@ function useEditingCallbackProps() {
30369
30539
  }
30370
30540
 
30371
30541
  // src/components/InfiniteTable/hooks/useColumnFilterOperatorMenu.ts
30372
- import { useEffect as useEffect33 } from "react";
30542
+ import { useEffect as useEffect34 } from "react";
30373
30543
 
30374
30544
  // src/components/InfiniteTable/utils/getFilterOperatorMenuForColumn.tsx
30375
30545
  import * as React68 from "react";
@@ -30512,7 +30682,7 @@ function useColumnFilterOperatorMenu() {
30512
30682
  } = useOverlay({
30513
30683
  portalContainer: portalDOMRef?.current ?? false
30514
30684
  });
30515
- useEffect33(() => {
30685
+ useEffect34(() => {
30516
30686
  const state = getState();
30517
30687
  return state.onFilterOperatorMenuClick.onChange((info) => {
30518
30688
  if (!info) {
@@ -30551,7 +30721,7 @@ function useColumnFilterOperatorMenu() {
30551
30721
  actions.filterOperatorMenuVisibleForColumnId = column.id;
30552
30722
  });
30553
30723
  }, []);
30554
- useEffect33(() => {
30724
+ useEffect34(() => {
30555
30725
  const { filterOperatorMenuVisibleForColumnId } = getState();
30556
30726
  if (filterOperatorMenuVisibleForColumnId) {
30557
30727
  let handleMouseDown2 = function(event) {
@@ -30578,7 +30748,7 @@ function useColumnFilterOperatorMenu() {
30578
30748
  }
30579
30749
 
30580
30750
  // src/components/InfiniteTable/hooks/useContextMenu.ts
30581
- import { useEffect as useEffect34 } from "react";
30751
+ import { useEffect as useEffect35 } from "react";
30582
30752
 
30583
30753
  // src/components/InfiniteTable/utils/getCellContextMenu.tsx
30584
30754
  import * as React70 from "react";
@@ -30753,7 +30923,7 @@ function useCellContextMenu() {
30753
30923
  } = useOverlay({
30754
30924
  portalContainer: portalDOMRef?.current ?? false
30755
30925
  });
30756
- useEffect34(() => {
30926
+ useEffect35(() => {
30757
30927
  const { actions: actions2, getState: getState2, getDataSourceState } = context;
30758
30928
  const state = getState2();
30759
30929
  return state.cellContextMenu.onChange((info) => {
@@ -30804,7 +30974,7 @@ function useCellContextMenu() {
30804
30974
  }
30805
30975
  });
30806
30976
  }, []);
30807
- useEffect34(() => {
30977
+ useEffect35(() => {
30808
30978
  const { cellContextMenuVisibleFor } = getState();
30809
30979
  if (cellContextMenuVisibleFor) {
30810
30980
  let handleMouseDown2 = function(event) {
@@ -30844,7 +31014,7 @@ function useTableContextMenu() {
30844
31014
  } = useOverlay({
30845
31015
  portalContainer: portalDOMRef?.current ?? false
30846
31016
  });
30847
- useEffect34(() => {
31017
+ useEffect35(() => {
30848
31018
  const { actions: actions2, getState: getState2 } = context;
30849
31019
  const state = getState2();
30850
31020
  return state.contextMenu.onChange((info) => {
@@ -30893,7 +31063,7 @@ function useTableContextMenu() {
30893
31063
  }
30894
31064
  });
30895
31065
  }, []);
30896
- useEffect34(() => {
31066
+ useEffect35(() => {
30897
31067
  const { contextMenuVisibleFor } = getState();
30898
31068
  if (contextMenuVisibleFor) {
30899
31069
  let handleMouseDown2 = function(event) {
@@ -30924,7 +31094,7 @@ import { useRef as useRef31 } from "react";
30924
31094
  import * as React71 from "react";
30925
31095
 
30926
31096
  // src/components/InfiniteTable/hooks/useGridScroll.ts
30927
- import { useCallback as useCallback32, useEffect as useEffect35 } from "react";
31097
+ import { useCallback as useCallback32, useEffect as useEffect36 } from "react";
30928
31098
  function useGridScroll(onScroll, deps) {
30929
31099
  const { brain } = useInfiniteTableSelector((ctx) => {
30930
31100
  return {
@@ -30932,7 +31102,7 @@ function useGridScroll(onScroll, deps) {
30932
31102
  };
30933
31103
  });
30934
31104
  const memoizedOnScroll = useCallback32(onScroll, deps);
30935
- useEffect35(() => {
31105
+ useEffect36(() => {
30936
31106
  const removeOnScroll = brain.onScroll(memoizedOnScroll);
30937
31107
  return removeOnScroll;
30938
31108
  }, [brain, memoizedOnScroll]);
@@ -31006,7 +31176,7 @@ function useVisibleColumnSizes() {
31006
31176
  var DEBUG_NAME = "InfiniteTable";
31007
31177
 
31008
31178
  // src/components/InfiniteTable/hooks/useHorizontalLayout.ts
31009
- import { useEffect as useEffect36 } from "react";
31179
+ import { useEffect as useEffect37 } from "react";
31010
31180
  function useHorizontalLayout() {
31011
31181
  const { getState, actions, dataSourceActions, getDataSourceState } = useInfiniteTableSelector((ctx) => {
31012
31182
  return {
@@ -31023,7 +31193,7 @@ function useHorizontalLayout() {
31023
31193
  if (!wrapRowsHorizontally) {
31024
31194
  repeatWrappedGroupRows = false;
31025
31195
  }
31026
- useEffect36(() => {
31196
+ useEffect37(() => {
31027
31197
  if (!wrapRowsHorizontally) {
31028
31198
  if (getDataSourceState().repeatWrappedGroupRows) {
31029
31199
  dataSourceActions.repeatWrappedGroupRows = false;
@@ -31067,7 +31237,7 @@ function useHorizontalLayout() {
31067
31237
  }
31068
31238
 
31069
31239
  // src/components/InfiniteTable/hooks/useDebugMode.ts
31070
- import { useEffect as useEffect37, useRef as useRef32 } from "react";
31240
+ import { useEffect as useEffect38, useRef as useRef32 } from "react";
31071
31241
 
31072
31242
  // src/utils/themeVarsUtils.ts
31073
31243
  function collectThemeVarNames() {
@@ -31269,7 +31439,7 @@ function useDebugMode() {
31269
31439
  }
31270
31440
  }
31271
31441
  }
31272
- useEffect37(() => {
31442
+ useEffect38(() => {
31273
31443
  const dataSourceState = getDataSourceState();
31274
31444
  if (dataSourceState.debugId !== debugId) {
31275
31445
  dataSourceActions.debugId = debugId;
@@ -31523,7 +31693,7 @@ function useDevTools() {
31523
31693
  const debugId = state.debugId;
31524
31694
  const debugIdRef = useRef32(debugId);
31525
31695
  debugIdRef.current = debugId;
31526
- useEffect37(() => {
31696
+ useEffect38(() => {
31527
31697
  const debugId2 = debugIdRef.current;
31528
31698
  if (!debugId2) {
31529
31699
  return;
@@ -31551,7 +31721,7 @@ function useDevTools() {
31551
31721
  withHookFn(hookFn2);
31552
31722
  });
31553
31723
  }, []);
31554
- useEffect37(() => {
31724
+ useEffect38(() => {
31555
31725
  const debugId2 = debugIdRef.current;
31556
31726
  if (!debugId2) {
31557
31727
  return;
@@ -31569,7 +31739,7 @@ function useDevTools() {
31569
31739
  });
31570
31740
  }
31571
31741
  });
31572
- useEffect37(() => {
31742
+ useEffect38(() => {
31573
31743
  if (!debugId) {
31574
31744
  return;
31575
31745
  }
@@ -31848,7 +32018,7 @@ import * as React78 from "react";
31848
32018
 
31849
32019
  // src/components/InfiniteTable/hooks/useCellRendering.tsx
31850
32020
  import { useMemo as useMemo20 } from "react";
31851
- import { useCallback as useCallback34, useEffect as useEffect38, useRef as useRef33 } from "react";
32021
+ import { useCallback as useCallback34, useEffect as useEffect39, useRef as useRef33 } from "react";
31852
32022
  import * as React75 from "react";
31853
32023
 
31854
32024
  // src/components/InfiniteTable/hooks/useYourBrain.ts
@@ -32111,6 +32281,7 @@ function useCellRendering(param) {
32111
32281
  isRowDetailsEnabled,
32112
32282
  cellClassName,
32113
32283
  cellStyle,
32284
+ repaintCellsKey,
32114
32285
  rowStyle,
32115
32286
  rowDetailCache,
32116
32287
  rowClassName,
@@ -32140,6 +32311,7 @@ function useCellRendering(param) {
32140
32311
  isRowDetailsEnabled: ctx.state.isRowDetailEnabled,
32141
32312
  cellClassName: ctx.state.cellClassName,
32142
32313
  cellStyle: ctx.state.cellStyle,
32314
+ repaintCellsKey: ctx.state.repaintCellsKey,
32143
32315
  rowStyle: ctx.state.rowStyle,
32144
32316
  rowDetailCache: ctx.state.rowDetailCache,
32145
32317
  rowClassName: ctx.state.rowClassName,
@@ -32204,17 +32376,17 @@ function useCellRendering(param) {
32204
32376
  rowspan
32205
32377
  });
32206
32378
  const scrollTopMaxRef = useRef33(0);
32207
- useEffect38(() => {
32379
+ useEffect39(() => {
32208
32380
  return brain.onRenderCountChange(() => {
32209
32381
  scrollTopMaxRef.current = brain.scrollTopMax;
32210
32382
  });
32211
32383
  }, [brain]);
32212
- useEffect38(() => {
32384
+ useEffect39(() => {
32213
32385
  return brain.onRenderRangeChange((range) => {
32214
32386
  getState().onRenderRangeChange?.(range);
32215
32387
  });
32216
32388
  }, [brain]);
32217
- useEffect38(() => {
32389
+ useEffect39(() => {
32218
32390
  return brain.onScrollStop((scrollPosition) => {
32219
32391
  const { scrollTop: scrollTop2, scrollLeft: scrollLeft2 } = scrollPosition;
32220
32392
  if (scrollTop2 === 0) {
@@ -32254,13 +32426,13 @@ function useCellRendering(param) {
32254
32426
  }
32255
32427
  });
32256
32428
  }, [brain, onScrollToTop, onScrollToBottom, onScrollStop]);
32257
- useEffect38(() => {
32429
+ useEffect39(() => {
32258
32430
  if (!bodySize.height) {
32259
32431
  return;
32260
32432
  }
32261
32433
  actions.ready = true;
32262
32434
  }, [!!bodySize.height]);
32263
- useEffect38(() => {
32435
+ useEffect39(() => {
32264
32436
  if (!ready) {
32265
32437
  }
32266
32438
  const { onReady } = getState();
@@ -32335,6 +32507,8 @@ function useCellRendering(param) {
32335
32507
  rowClassName,
32336
32508
  cellStyle,
32337
32509
  cellClassName,
32510
+ // the column-level key wins over the table-level one
32511
+ repaintCellsKey: column.repaintCellsKey !== void 0 ? column.repaintCellsKey : repaintCellsKey,
32338
32512
  visibleColumnIds,
32339
32513
  computedColumnOrder,
32340
32514
  // Whether this specific cell is in edit mode
@@ -32376,6 +32550,7 @@ function useCellRendering(param) {
32376
32550
  rowClassName,
32377
32551
  cellClassName,
32378
32552
  cellStyle,
32553
+ repaintCellsKey,
32379
32554
  getDataSourceState,
32380
32555
  dataSourceApi,
32381
32556
  dataSourceActions,
@@ -32431,7 +32606,7 @@ function useCellRendering(param) {
32431
32606
  }
32432
32607
 
32433
32608
  // src/components/InfiniteTable/hooks/useToggleWrapRowsHorizontally.ts
32434
- import { useEffect as useEffect39 } from "react";
32609
+ import { useEffect as useEffect40 } from "react";
32435
32610
  function useToggleWrapRowsHorizontally() {
32436
32611
  const { state, getState, actions } = useInfiniteTableSelector((ctx) => {
32437
32612
  return {
@@ -32442,7 +32617,7 @@ function useToggleWrapRowsHorizontally() {
32442
32617
  });
32443
32618
  const { wrapRowsHorizontally } = state;
32444
32619
  const oldWrapRowsHorizontally = usePrevious(wrapRowsHorizontally);
32445
- useEffect39(() => {
32620
+ useEffect40(() => {
32446
32621
  if (oldWrapRowsHorizontally !== wrapRowsHorizontally) {
32447
32622
  const { brain, headerBrain, renderer, onRenderUpdater } = getState();
32448
32623
  brain.destroy();
@@ -33279,7 +33454,7 @@ var keyboardShortcuts = {
33279
33454
  };
33280
33455
 
33281
33456
  // src/components/hooks/useInterceptedMap.ts
33282
- import { useEffect as useEffect41 } from "react";
33457
+ import { useEffect as useEffect42 } from "react";
33283
33458
  function interceptMap(map2, fns) {
33284
33459
  const { set, delete: deleteKey, clear } = map2;
33285
33460
  if (fns.set) {
@@ -33441,7 +33616,7 @@ _WeakFixedSizeSet.DEFAULT_SIZE = 10;
33441
33616
  var WeakFixedSizeSet = _WeakFixedSizeSet;
33442
33617
 
33443
33618
  // src/components/hooks/useEffectWhenSameDeps.ts
33444
- import { useEffect as useEffect42, useRef as useRef34 } from "react";
33619
+ import { useEffect as useEffect43, useRef as useRef34 } from "react";
33445
33620
  var isSameDeps = (deps, prevDeps) => {
33446
33621
  return deps.every((dep, index) => dep === prevDeps[index]);
33447
33622
  };
@@ -33455,7 +33630,7 @@ var useEffectWhenSameDeps = (callback, deps) => {
33455
33630
  effectDepsRef.current = effectDeps;
33456
33631
  const callbackRef = useRef34(callback);
33457
33632
  callbackRef.current = callback;
33458
- useEffect42(() => {
33633
+ useEffect43(() => {
33459
33634
  if (isInitialRef.current) {
33460
33635
  isInitialRef.current = false;
33461
33636
  return;
@@ -33465,7 +33640,7 @@ var useEffectWhenSameDeps = (callback, deps) => {
33465
33640
  };
33466
33641
 
33467
33642
  // src/components/hooks/useEffectWhen.ts
33468
- import { useEffect as useEffect43, useRef as useRef35 } from "react";
33643
+ import { useEffect as useEffect44, useRef as useRef35 } from "react";
33469
33644
  var isSameDeps2 = (deps, prevDeps, compare) => {
33470
33645
  return deps.every((dep, index) => {
33471
33646
  if (compare) {
@@ -33495,7 +33670,7 @@ var useEffectWhen = (callback, options) => {
33495
33670
  if (sameRespected && differentRespected) {
33496
33671
  isInitialRef.current = false;
33497
33672
  }
33498
- useEffect43(() => {
33673
+ useEffect44(() => {
33499
33674
  if (isInitialRef.current) {
33500
33675
  return;
33501
33676
  }
@@ -33609,11 +33784,11 @@ var FlashingColumnCell = createFlashingColumnCellComponent();
33609
33784
 
33610
33785
  // src/components/HeadlessTable/MatrixDebugger.tsx
33611
33786
  import * as React83 from "react";
33612
- import { useEffect as useEffect44, useRef as useRef37 } from "react";
33787
+ import { useEffect as useEffect45, useRef as useRef37 } from "react";
33613
33788
  import { createPortal as createPortal3 } from "react-dom";
33614
33789
  function INTERNAL_MatrixDebugger(props) {
33615
33790
  const [getState, setGetState] = React83.useState(null);
33616
- useEffect44(() => {
33791
+ useEffect45(() => {
33617
33792
  const { debugTarget } = props;
33618
33793
  const intervalId = setInterval(() => {
33619
33794
  if (globalThis.INFINITE && globalThis.INFINITE[debugTarget]) {
@@ -33636,7 +33811,7 @@ function MatrixDebuggerUI() {
33636
33811
  const { getState } = contextValue;
33637
33812
  const [, rerender] = useRerender();
33638
33813
  const cellManager = getState().renderer.cellManager;
33639
- useEffect44(() => {
33814
+ useEffect45(() => {
33640
33815
  const delayedRerender = debounce(
33641
33816
  () => {
33642
33817
  console.log("rerender");