shadcn-ui-react 0.2.5 → 0.2.7
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.cjs +6 -1
- package/dist/index.js +6 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -7664,6 +7664,11 @@ function DataTable({
|
|
|
7664
7664
|
manualPagination: true,
|
|
7665
7665
|
manualFiltering: true
|
|
7666
7666
|
});
|
|
7667
|
+
const onClickItem = (row) => {
|
|
7668
|
+
if (onClick) {
|
|
7669
|
+
onClick(row);
|
|
7670
|
+
}
|
|
7671
|
+
};
|
|
7667
7672
|
(0, import_react35.useEffect)(() => {
|
|
7668
7673
|
if (onPageChange) {
|
|
7669
7674
|
onPageChange(pagination.pageIndex);
|
|
@@ -7687,7 +7692,7 @@ function DataTable({
|
|
|
7687
7692
|
TableRow,
|
|
7688
7693
|
{
|
|
7689
7694
|
"data-state": row.getIsSelected() ? "selected" : void 0,
|
|
7690
|
-
onClick: () =>
|
|
7695
|
+
onClick: () => onClickItem(row.original),
|
|
7691
7696
|
className: rowClassName,
|
|
7692
7697
|
children: row.getVisibleCells().map((cell) => /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(TableCell, { className: cellClassName, children: (0, import_react_table.flexRender)(
|
|
7693
7698
|
cell.column.columnDef.cell,
|
package/dist/index.js
CHANGED
|
@@ -7466,6 +7466,11 @@ function DataTable({
|
|
|
7466
7466
|
manualPagination: true,
|
|
7467
7467
|
manualFiltering: true
|
|
7468
7468
|
});
|
|
7469
|
+
const onClickItem = (row) => {
|
|
7470
|
+
if (onClick) {
|
|
7471
|
+
onClick(row);
|
|
7472
|
+
}
|
|
7473
|
+
};
|
|
7469
7474
|
useEffect4(() => {
|
|
7470
7475
|
if (onPageChange) {
|
|
7471
7476
|
onPageChange(pagination.pageIndex);
|
|
@@ -7489,7 +7494,7 @@ function DataTable({
|
|
|
7489
7494
|
TableRow,
|
|
7490
7495
|
{
|
|
7491
7496
|
"data-state": row.getIsSelected() ? "selected" : void 0,
|
|
7492
|
-
onClick: () =>
|
|
7497
|
+
onClick: () => onClickItem(row.original),
|
|
7493
7498
|
className: rowClassName,
|
|
7494
7499
|
children: row.getVisibleCells().map((cell) => /* @__PURE__ */ jsx48(TableCell, { className: cellClassName, children: flexRender(
|
|
7495
7500
|
cell.column.columnDef.cell,
|