eidos-ui 1.2.0 → 2.0.0

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.
Files changed (35) hide show
  1. package/dist/Table.types-Cl5gR8r9.d.cts +183 -0
  2. package/dist/Table.types-jhPb7JNU.d.ts +183 -0
  3. package/dist/{chunk-6XB3QTHO.cjs → chunk-2ZENLZEQ.cjs} +55 -51
  4. package/dist/chunk-2ZENLZEQ.cjs.map +1 -0
  5. package/dist/{chunk-6DBCT5MK.js → chunk-AJZTVCST.js} +1 -1
  6. package/dist/chunk-AJZTVCST.js.map +1 -0
  7. package/dist/{chunk-P2ZHWFK4.js → chunk-MH2CD2QT.js} +29 -25
  8. package/dist/chunk-MH2CD2QT.js.map +1 -0
  9. package/dist/{chunk-NUK4NT5Q.cjs → chunk-QONDJ5VM.cjs} +11 -11
  10. package/dist/chunk-QONDJ5VM.cjs.map +1 -0
  11. package/dist/{chunk-2KO5ZCZC.js → chunk-VSFKM7FE.js} +2 -2
  12. package/dist/chunk-VSFKM7FE.js.map +1 -0
  13. package/dist/{chunk-TKLWQWMT.cjs → chunk-XVSODE4K.cjs} +1 -1
  14. package/dist/chunk-XVSODE4K.cjs.map +1 -0
  15. package/dist/data-grid/index.cjs +3 -3
  16. package/dist/data-grid/index.d.cts +123 -51
  17. package/dist/data-grid/index.d.ts +123 -51
  18. package/dist/data-grid/index.js +2 -2
  19. package/dist/index.cjs +4 -4
  20. package/dist/index.d.cts +2 -2
  21. package/dist/index.d.ts +2 -2
  22. package/dist/index.js +3 -3
  23. package/dist/table/index.cjs +3 -3
  24. package/dist/table/index.d.cts +5 -5
  25. package/dist/table/index.d.ts +5 -5
  26. package/dist/table/index.js +2 -2
  27. package/package.json +1 -1
  28. package/dist/Table.types-Bv9l7qxd.d.ts +0 -103
  29. package/dist/Table.types-DQ0ReOLj.d.cts +0 -103
  30. package/dist/chunk-2KO5ZCZC.js.map +0 -1
  31. package/dist/chunk-6DBCT5MK.js.map +0 -1
  32. package/dist/chunk-6XB3QTHO.cjs.map +0 -1
  33. package/dist/chunk-NUK4NT5Q.cjs.map +0 -1
  34. package/dist/chunk-P2ZHWFK4.js.map +0 -1
  35. package/dist/chunk-TKLWQWMT.cjs.map +0 -1
@@ -11,7 +11,7 @@
11
11
 
12
12
 
13
13
 
14
- var _chunkTKLWQWMTcjs = require('./chunk-TKLWQWMT.cjs');
14
+ var _chunkXVSODE4Kcjs = require('./chunk-XVSODE4K.cjs');
15
15
 
16
16
 
17
17
  var _chunkTROYIUDHcjs = require('./chunk-TROYIUDH.cjs');
@@ -71,6 +71,7 @@ var _reactdom = require('react-dom');
71
71
  var _lucidereact = require('lucide-react');
72
72
  var _jsxruntime = require('react/jsx-runtime');
73
73
  var MIN_COLUMN_WIDTH_PX = 100;
74
+ var cellOf = (row, key) => row[key];
74
75
  var QUICK_FILTER_RESET_VALUE = "";
75
76
  var hasFilterValue = (value) => {
76
77
  if (value === void 0 || value === null || value === "") return false;
@@ -84,7 +85,7 @@ function SortableTableRow({
84
85
  className,
85
86
  children
86
87
  }) {
87
- const { attributes, listeners, setNodeRef, transform, transition, isDragging } = _chunkTKLWQWMTcjs.useSortable.call(void 0, {
88
+ const { attributes, listeners, setNodeRef, transform, transition, isDragging } = _chunkXVSODE4Kcjs.useSortable.call(void 0, {
88
89
  id,
89
90
  disabled
90
91
  });
@@ -94,7 +95,7 @@ function SortableTableRow({
94
95
  ref: setNodeRef,
95
96
  className: [className, isDragging ? "eidos-datagrid-row--dragging" : ""].filter(Boolean).join(" "),
96
97
  style: {
97
- transform: _chunkTKLWQWMTcjs.CSS.Transform.toString(transform),
98
+ transform: _chunkXVSODE4Kcjs.CSS.Transform.toString(transform),
98
99
  transition: _nullishCoalesce(transition, () => ( void 0)),
99
100
  opacity: isDragging ? 0.4 : 1
100
101
  },
@@ -167,9 +168,9 @@ function ExpandedCardPanel({
167
168
  }
168
169
  function DataGridInner({
169
170
  // ── Existing props ─────────────────────────────────────────────────────────
170
- columns,
171
+ columns: columnsProp,
171
172
  data,
172
- rowKey = "id",
173
+ rowKey,
173
174
  onChange,
174
175
  onRowAdd,
175
176
  editable = false,
@@ -219,6 +220,8 @@ function DataGridInner({
219
220
  cardViewBreakpoint = 640,
220
221
  cardMinWidth = 280
221
222
  }) {
223
+ const columns = columnsProp;
224
+ const rowKeyField = _nullishCoalesce(rowKey, () => ( "id"));
222
225
  const [localData, _setLocalData] = _react.useState.call(void 0, data);
223
226
  const localDataRef = _react.useRef.call(void 0, data);
224
227
  const [editingCell, _setEditingCell] = _react.useState.call(void 0, null);
@@ -326,15 +329,15 @@ function DataGridInner({
326
329
  [isControlledSelection, controlledSelectedRows, internalSelectedKeys]
327
330
  );
328
331
  const allKeys = _react.useMemo.call(void 0,
329
- () => localData.map((row, idx) => String(_nullishCoalesce(row[rowKey], () => ( idx)))),
330
- [localData, rowKey]
332
+ () => localData.map((row, idx) => String(_nullishCoalesce(cellOf(row, rowKeyField), () => ( idx)))),
333
+ [localData, rowKeyField]
331
334
  );
332
335
  const allSelected = allKeys.length > 0 && allKeys.every((k) => selectedSet.has(k));
333
336
  const someSelected = !allSelected && allKeys.some((k) => selectedSet.has(k));
334
337
  const hasSelection = selectedSet.size > 0;
335
338
  const selectedItems = _react.useMemo.call(void 0,
336
- () => localData.filter((row, idx) => selectedSet.has(String(_nullishCoalesce(row[rowKey], () => ( idx))))),
337
- [localData, selectedSet, rowKey]
339
+ () => localData.filter((row, idx) => selectedSet.has(String(_nullishCoalesce(cellOf(row, rowKeyField), () => ( idx))))),
340
+ [localData, selectedSet, rowKeyField]
338
341
  );
339
342
  const expandedSet = _react.useMemo.call(void 0,
340
343
  () => new Set(isControlledExpansion ? _nullishCoalesce(controlledExpandedRows, () => ( [])) : [...internalExpandedKeys]),
@@ -373,7 +376,7 @@ function DataGridInner({
373
376
  if (filterEntries.length === 0) return localData;
374
377
  return localData.filter(
375
378
  (row) => filterEntries.every(([key, filterValue]) => {
376
- const cellValue = row[key];
379
+ const cellValue = cellOf(row, key);
377
380
  if (Array.isArray(filterValue)) {
378
381
  return filterValue.includes(String(_nullishCoalesce(cellValue, () => ( ""))));
379
382
  }
@@ -394,8 +397,8 @@ function DataGridInner({
394
397
  const sortedData = _react.useMemo.call(void 0, () => {
395
398
  if (onSortChange || !activeSort) return filteredData;
396
399
  return [...filteredData].sort((a, b) => {
397
- const aVal = a[activeSort.key];
398
- const bVal = b[activeSort.key];
400
+ const aVal = cellOf(a, activeSort.key);
401
+ const bVal = cellOf(b, activeSort.key);
399
402
  if (aVal == null && bVal == null) return 0;
400
403
  if (aVal == null) return 1;
401
404
  if (bVal == null) return -1;
@@ -509,7 +512,7 @@ function DataGridInner({
509
512
  localData.forEach((row, rowIndex) => {
510
513
  for (const col of columns) {
511
514
  if (!isCellEditable(col)) continue;
512
- const error = validateCell(col, row[col.key]);
515
+ const error = validateCell(col, cellOf(row, col.key));
513
516
  if (error) errors[cellErrorKey(rowIndex, col.key)] = error;
514
517
  }
515
518
  });
@@ -575,19 +578,20 @@ function DataGridInner({
575
578
  );
576
579
  const handleCellClick = _react.useCallback.call(void 0,
577
580
  (rowIndex, col) => {
578
- const value = _optionalChain([localDataRef, 'access', _12 => _12.current, 'access', _13 => _13[rowIndex], 'optionalAccess', _14 => _14[col.key]]);
581
+ const row = localDataRef.current[rowIndex];
582
+ const value = row === void 0 ? void 0 : cellOf(row, col.key);
579
583
  if (col.type === "checkbox") {
580
584
  if (!editable || col.editable === false) return;
581
585
  const newData = localDataRef.current.map(
582
- (row, idx) => idx === rowIndex ? { ...row, [col.key]: !value } : row
586
+ (row2, idx) => idx === rowIndex ? { ...row2, [col.key]: !value } : row2
583
587
  );
584
588
  setLocalData(newData);
585
- _optionalChain([onChange, 'optionalCall', _15 => _15(newData)]);
589
+ _optionalChain([onChange, 'optionalCall', _12 => _12(newData)]);
586
590
  return;
587
591
  }
588
592
  if (!isCellEditable(col)) return;
589
593
  const cell = editingCellRef.current;
590
- if (_optionalChain([cell, 'optionalAccess', _16 => _16.rowIndex]) === rowIndex && _optionalChain([cell, 'optionalAccess', _17 => _17.colKey]) === col.key) return;
594
+ if (_optionalChain([cell, 'optionalAccess', _13 => _13.rowIndex]) === rowIndex && _optionalChain([cell, 'optionalAccess', _14 => _14.colKey]) === col.key) return;
591
595
  if (cell) commitEdit();
592
596
  startEdit(rowIndex, col.key, value);
593
597
  },
@@ -620,7 +624,7 @@ function DataGridInner({
620
624
  commitValue(rowIndex, colKey, editValueRef.current);
621
625
  if (next) {
622
626
  setEditingCell(next);
623
- setEditValue(localDataRef.current[next.rowIndex][next.colKey]);
627
+ setEditValue(cellOf(localDataRef.current[next.rowIndex], next.colKey));
624
628
  setEditError(_nullishCoalesce(cellErrors[cellErrorKey(next.rowIndex, next.colKey)], () => ( null)));
625
629
  } else {
626
630
  setEditingCell(null);
@@ -644,18 +648,18 @@ function DataGridInner({
644
648
  const newRow = onRowAdd();
645
649
  const newData = [newRow, ...localDataRef.current];
646
650
  setLocalData(newData);
647
- _optionalChain([onChange, 'optionalCall', _18 => _18(newData)]);
651
+ _optionalChain([onChange, 'optionalCall', _15 => _15(newData)]);
648
652
  setCurrentPage(1);
649
653
  }, [onRowAdd, onChange, setLocalData]);
650
654
  const commitSelection = _react.useCallback.call(void 0,
651
655
  (keys) => {
652
656
  if (!isControlledSelection) setInternalSelectedKeys(new Set(keys));
653
657
  const rows = localDataRef.current.filter(
654
- (row, idx) => keys.includes(String(_nullishCoalesce(row[rowKey], () => ( idx))))
658
+ (row, idx) => keys.includes(String(_nullishCoalesce(cellOf(row, rowKeyField), () => ( idx))))
655
659
  );
656
- _optionalChain([onSelectionChange, 'optionalCall', _19 => _19(keys, rows)]);
660
+ _optionalChain([onSelectionChange, 'optionalCall', _16 => _16(keys, rows)]);
657
661
  },
658
- [isControlledSelection, rowKey, onSelectionChange]
662
+ [isControlledSelection, rowKeyField, onSelectionChange]
659
663
  );
660
664
  const toggleRow = _react.useCallback.call(void 0,
661
665
  (key) => {
@@ -671,7 +675,7 @@ function DataGridInner({
671
675
  const commitExpanded = _react.useCallback.call(void 0,
672
676
  (keys) => {
673
677
  if (!isControlledExpansion) setInternalExpandedKeys(new Set(keys));
674
- _optionalChain([onExpandedRowsChange, 'optionalCall', _20 => _20(keys)]);
678
+ _optionalChain([onExpandedRowsChange, 'optionalCall', _17 => _17(keys)]);
675
679
  },
676
680
  [isControlledExpansion, onExpandedRowsChange]
677
681
  );
@@ -686,11 +690,11 @@ function DataGridInner({
686
690
  const handleSortClick = _react.useCallback.call(void 0,
687
691
  (colKey) => {
688
692
  if (onSortChange) {
689
- const newDir = _optionalChain([currentSort, 'optionalAccess', _21 => _21.key]) === colKey && _optionalChain([currentSort, 'optionalAccess', _22 => _22.direction]) === "asc" ? "desc" : "asc";
693
+ const newDir = _optionalChain([currentSort, 'optionalAccess', _18 => _18.key]) === colKey && _optionalChain([currentSort, 'optionalAccess', _19 => _19.direction]) === "asc" ? "desc" : "asc";
690
694
  onSortChange(colKey, newDir);
691
695
  } else {
692
696
  setInternalSort((prev) => {
693
- if (_optionalChain([prev, 'optionalAccess', _23 => _23.key]) === colKey) {
697
+ if (_optionalChain([prev, 'optionalAccess', _20 => _20.key]) === colKey) {
694
698
  return prev.direction === "asc" ? { key: colKey, direction: "desc" } : null;
695
699
  }
696
700
  return { key: colKey, direction: "asc" };
@@ -735,7 +739,7 @@ function DataGridInner({
735
739
  const handlePageChange = _react.useCallback.call(void 0,
736
740
  (page) => {
737
741
  setCurrentPage(page);
738
- _optionalChain([onPageChange, 'optionalCall', _24 => _24(page, currentPageSize)]);
742
+ _optionalChain([onPageChange, 'optionalCall', _21 => _21(page, currentPageSize)]);
739
743
  },
740
744
  [currentPageSize, onPageChange]
741
745
  );
@@ -743,13 +747,13 @@ function DataGridInner({
743
747
  (newPageSize) => {
744
748
  setCurrentPageSize(newPageSize);
745
749
  setCurrentPage(1);
746
- _optionalChain([onPageChange, 'optionalCall', _25 => _25(1, newPageSize)]);
750
+ _optionalChain([onPageChange, 'optionalCall', _22 => _22(1, newPageSize)]);
747
751
  },
748
752
  [onPageChange]
749
753
  );
750
- const sensors = _chunkTKLWQWMTcjs.useSensors.call(void 0,
751
- _chunkTKLWQWMTcjs.useSensor.call(void 0, _chunkTKLWQWMTcjs.PointerSensor, { activationConstraint: { distance: 5 } }),
752
- _chunkTKLWQWMTcjs.useSensor.call(void 0, _chunkTKLWQWMTcjs.KeyboardSensor)
754
+ const sensors = _chunkXVSODE4Kcjs.useSensors.call(void 0,
755
+ _chunkXVSODE4Kcjs.useSensor.call(void 0, _chunkXVSODE4Kcjs.PointerSensor, { activationConstraint: { distance: 5 } }),
756
+ _chunkXVSODE4Kcjs.useSensor.call(void 0, _chunkXVSODE4Kcjs.KeyboardSensor)
753
757
  );
754
758
  const handleRowDragEnd = _react.useCallback.call(void 0,
755
759
  (event) => {
@@ -757,18 +761,18 @@ function DataGridInner({
757
761
  const { active, over } = event;
758
762
  if (!over || active.id === over.id) return;
759
763
  const oldIndex = localDataRef.current.findIndex(
760
- (row, i) => String(_nullishCoalesce(row[rowKey], () => ( i))) === String(active.id)
764
+ (row, i) => String(_nullishCoalesce(cellOf(row, rowKeyField), () => ( i))) === String(active.id)
761
765
  );
762
766
  const newIndex = localDataRef.current.findIndex(
763
- (row, i) => String(_nullishCoalesce(row[rowKey], () => ( i))) === String(over.id)
767
+ (row, i) => String(_nullishCoalesce(cellOf(row, rowKeyField), () => ( i))) === String(over.id)
764
768
  );
765
769
  if (oldIndex === -1 || newIndex === -1) return;
766
- const newData = _chunkTKLWQWMTcjs.arrayMove.call(void 0, localDataRef.current, oldIndex, newIndex);
770
+ const newData = _chunkXVSODE4Kcjs.arrayMove.call(void 0, localDataRef.current, oldIndex, newIndex);
767
771
  setLocalData(newData);
768
- _optionalChain([onChange, 'optionalCall', _26 => _26(newData)]);
769
- _optionalChain([onRowReorder, 'optionalCall', _27 => _27(newData)]);
772
+ _optionalChain([onChange, 'optionalCall', _23 => _23(newData)]);
773
+ _optionalChain([onRowReorder, 'optionalCall', _24 => _24(newData)]);
770
774
  },
771
- [draggableRows, rowKey, setLocalData, onChange, onRowReorder]
775
+ [draggableRows, rowKeyField, setLocalData, onChange, onRowReorder]
772
776
  );
773
777
  const renderViewCell = (col, value, row, rowIndex) => {
774
778
  if (col.renderCell) return col.renderCell(value, row, rowIndex);
@@ -784,7 +788,7 @@ function DataGridInner({
784
788
  }
785
789
  );
786
790
  case "select": {
787
- const option = _optionalChain([col, 'access', _28 => _28.options, 'optionalAccess', _29 => _29.find, 'call', _30 => _30((o) => o.value === String(_nullishCoalesce(value, () => ( ""))))]);
791
+ const option = _optionalChain([col, 'access', _25 => _25.options, 'optionalAccess', _26 => _26.find, 'call', _27 => _27((o) => o.value === String(_nullishCoalesce(value, () => ( ""))))]);
788
792
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: option ? option.label : String(_nullishCoalesce(value, () => ( ""))) });
789
793
  }
790
794
  case "readonly":
@@ -850,7 +854,7 @@ function DataGridInner({
850
854
  (r, i) => i === rowIndex ? { ...r, [col.key]: selected } : r
851
855
  );
852
856
  setLocalData(newData);
853
- _optionalChain([onChange, 'optionalCall', _31 => _31(newData)]);
857
+ _optionalChain([onChange, 'optionalCall', _28 => _28(newData)]);
854
858
  setEditingCell(null);
855
859
  },
856
860
  clearable: false
@@ -874,8 +878,8 @@ function DataGridInner({
874
878
  }
875
879
  };
876
880
  const renderCardValue = (col, row, localIndex, baseClassName) => {
877
- const value = row[col.key];
878
- const isEditing = _optionalChain([editingCell, 'optionalAccess', _32 => _32.rowIndex]) === localIndex && _optionalChain([editingCell, 'optionalAccess', _33 => _33.colKey]) === col.key;
881
+ const value = cellOf(row, col.key);
882
+ const isEditing = _optionalChain([editingCell, 'optionalAccess', _29 => _29.rowIndex]) === localIndex && _optionalChain([editingCell, 'optionalAccess', _30 => _30.colKey]) === col.key;
879
883
  const canEdit = isCellEditable(col);
880
884
  const isFlagged = cellErrorKey(localIndex, col.key) in cellErrors;
881
885
  const hasError = isEditing && Boolean(editError);
@@ -948,7 +952,7 @@ function DataGridInner({
948
952
  [dataColumns]
949
953
  );
950
954
  const totalCols = dataColumns.length + (showRowNumbers ? 1 : 0) + (actionsColumn ? 1 : 0) + (draggableRows ? 1 : 0) + (selectable ? 1 : 0) + (expandable ? 1 : 0);
951
- const rowIds = displayData.map((row, i) => String(_nullishCoalesce(row[rowKey], () => ( i))));
955
+ const rowIds = displayData.map((row, i) => String(_nullishCoalesce(cellOf(row, rowKeyField), () => ( i))));
952
956
  const containerStyle = {};
953
957
  if (stickyHeader && maxHeight) {
954
958
  containerStyle.maxHeight = typeof maxHeight === "number" ? `${maxHeight}px` : maxHeight;
@@ -1167,7 +1171,7 @@ function DataGridInner({
1167
1171
  }
1168
1172
  ),
1169
1173
  showFilters && filterDropdownColumns.length > 0 && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1170
- _chunkTKLWQWMTcjs.TableFiltersDropdown,
1174
+ _chunkXVSODE4Kcjs.TableFiltersDropdown,
1171
1175
  {
1172
1176
  columns: filterDropdownColumns,
1173
1177
  filters: dropdownFilters,
@@ -1186,7 +1190,7 @@ function DataGridInner({
1186
1190
  style: { "--eidos-datagrid-card-min-width": `${cardMinWidth}px` },
1187
1191
  children: displayData.length > 0 ? displayData.map((row, displayIndex) => {
1188
1192
  const localIndex = localData.indexOf(row);
1189
- const rowKeyValue = String(_nullishCoalesce(row[rowKey], () => ( displayIndex)));
1193
+ const rowKeyValue = String(_nullishCoalesce(cellOf(row, rowKeyField), () => ( displayIndex)));
1190
1194
  const isRowSelected = selectable && selectedSet.has(rowKeyValue);
1191
1195
  const isRowExpanded = expandable && expandedSet.has(rowKeyValue);
1192
1196
  const canExpandRow = !isRowExpandable || isRowExpandable(row);
@@ -1276,10 +1280,10 @@ function DataGridInner({
1276
1280
  }
1277
1281
  )
1278
1282
  ) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _jsxruntime.Fragment, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1279
- _chunkTKLWQWMTcjs.DndContext,
1283
+ _chunkXVSODE4Kcjs.DndContext,
1280
1284
  {
1281
1285
  sensors,
1282
- collisionDetection: _chunkTKLWQWMTcjs.closestCenter,
1286
+ collisionDetection: _chunkXVSODE4Kcjs.closestCenter,
1283
1287
  onDragEnd: handleRowDragEnd,
1284
1288
  children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "eidos-data-grid-scroll", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "table", { className: ["eidos-data-grid", densityClass].filter(Boolean).join(" "), children: [
1285
1289
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "thead", { ref: theadRef, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "tr", { children: [
@@ -1344,7 +1348,7 @@ function DataGridInner({
1344
1348
  sortedColumns.map((col) => {
1345
1349
  const colKey = col.key;
1346
1350
  const isSortable = !!col.sortable;
1347
- const isCurrentlySorted = _optionalChain([activeSort, 'optionalAccess', _34 => _34.key]) === colKey;
1351
+ const isCurrentlySorted = _optionalChain([activeSort, 'optionalAccess', _31 => _31.key]) === colKey;
1348
1352
  const sortDir = isCurrentlySorted ? activeSort.direction : null;
1349
1353
  const alignClass = `eidos-datagrid-align-${_nullishCoalesce(col.align, () => ( "left"))}`;
1350
1354
  const { style: pinnedStyle, className: pinnedClass } = getHeaderPinnedProps(colKey);
@@ -1385,9 +1389,9 @@ function DataGridInner({
1385
1389
  }
1386
1390
  )
1387
1391
  ] }) }),
1388
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "tbody", { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkTKLWQWMTcjs.SortableContext, { items: rowIds, strategy: _chunkTKLWQWMTcjs.verticalListSortingStrategy, children: displayData.length > 0 ? displayData.map((row, displayIndex) => {
1392
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "tbody", { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXVSODE4Kcjs.SortableContext, { items: rowIds, strategy: _chunkXVSODE4Kcjs.verticalListSortingStrategy, children: displayData.length > 0 ? displayData.map((row, displayIndex) => {
1389
1393
  const localIndex = localData.indexOf(row);
1390
- const rowKeyValue = String(_nullishCoalesce(row[rowKey], () => ( displayIndex)));
1394
+ const rowKeyValue = String(_nullishCoalesce(cellOf(row, rowKeyField), () => ( displayIndex)));
1391
1395
  const isRowSelected = selectable && selectedSet.has(rowKeyValue);
1392
1396
  const isRowExpanded = expandable && expandedSet.has(rowKeyValue);
1393
1397
  const canExpandRow = !isRowExpandable || isRowExpandable(row);
@@ -1489,8 +1493,8 @@ function DataGridInner({
1489
1493
  }
1490
1494
  ),
1491
1495
  sortedColumns.map((col) => {
1492
- const value = row[col.key];
1493
- const isEditing = _optionalChain([editingCell, 'optionalAccess', _35 => _35.rowIndex]) === localIndex && _optionalChain([editingCell, 'optionalAccess', _36 => _36.colKey]) === col.key;
1496
+ const value = cellOf(row, col.key);
1497
+ const isEditing = _optionalChain([editingCell, 'optionalAccess', _32 => _32.rowIndex]) === localIndex && _optionalChain([editingCell, 'optionalAccess', _33 => _33.colKey]) === col.key;
1494
1498
  const canEdit = isCellEditable(col);
1495
1499
  const isFlagged = cellErrorKey(localIndex, col.key) in cellErrors;
1496
1500
  const hasError = isEditing && Boolean(editError);
@@ -1609,4 +1613,4 @@ var DataGrid = Object.assign(DataGridInner, { displayName: "DataGrid" });
1609
1613
 
1610
1614
 
1611
1615
  exports.DataGrid = DataGrid;
1612
- //# sourceMappingURL=chunk-6XB3QTHO.cjs.map
1616
+ //# sourceMappingURL=chunk-2ZENLZEQ.cjs.map