@postxl/ui-components 1.2.2 → 1.2.3
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/dist/index.d.ts +277 -262
- package/dist/index.js +14 -7
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -2491,10 +2491,7 @@ function DataGridRowImpl({ row, virtualRowIndex, virtualStart, rowVirtualizer, r
|
|
|
2491
2491
|
...getCommonPinningStyles({ column: cell.column }),
|
|
2492
2492
|
width: `calc(var(--col-${cell.column.id}-size) * 1px)`
|
|
2493
2493
|
},
|
|
2494
|
-
children:
|
|
2495
|
-
className: cn("size-full px-3 py-1.5", { "bg-accent-foreground/10": isRowSelected }),
|
|
2496
|
-
children: flexRender(cell.column.columnDef.cell, cell.getContext())
|
|
2497
|
-
}) : flexRender(cell.column.columnDef.cell, cell.getContext())
|
|
2494
|
+
children: flexRender(cell.column.columnDef.cell, cell.getContext())
|
|
2498
2495
|
}, cell.id);
|
|
2499
2496
|
})
|
|
2500
2497
|
}, row.id);
|
|
@@ -3862,16 +3859,26 @@ function NumberCell({ cell, table, rowIndex, columnId, isFocused, isEditing, isS
|
|
|
3862
3859
|
|
|
3863
3860
|
//#endregion
|
|
3864
3861
|
//#region src/data-grid/cell-variants/react-node-cell.tsx
|
|
3865
|
-
function ReactNodeCell({ cell, table, rowIndex, columnId, isFocused, isSelected }) {
|
|
3866
|
-
const children = cell.getValue();
|
|
3862
|
+
function ReactNodeCell({ cell, table, rowIndex, columnId, isFocused, isSelected, isEditing }) {
|
|
3867
3863
|
const containerRef = React$18.useRef(null);
|
|
3864
|
+
const cellOpts = cell.column.columnDef.meta?.cell;
|
|
3865
|
+
const renderFn = cellOpts?.variant === "react-node" ? cellOpts.render : void 0;
|
|
3866
|
+
const children = renderFn ? renderFn({
|
|
3867
|
+
cell,
|
|
3868
|
+
table,
|
|
3869
|
+
rowIndex,
|
|
3870
|
+
columnId,
|
|
3871
|
+
isFocused,
|
|
3872
|
+
isSelected,
|
|
3873
|
+
isEditing
|
|
3874
|
+
}) : cell.getValue();
|
|
3868
3875
|
return /* @__PURE__ */ jsx(DataGridCellWrapper, {
|
|
3869
3876
|
ref: containerRef,
|
|
3870
3877
|
cell,
|
|
3871
3878
|
table,
|
|
3872
3879
|
rowIndex,
|
|
3873
3880
|
columnId,
|
|
3874
|
-
isEditing
|
|
3881
|
+
isEditing,
|
|
3875
3882
|
isFocused,
|
|
3876
3883
|
isSelected,
|
|
3877
3884
|
className: "flex size-full justify-center p-0",
|