@ctlyst.id/internal-ui 5.3.0 → 5.3.2
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/index.d.mts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +9 -8
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +9 -8
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
@@ -1229,7 +1229,8 @@ var useDataTable = ({
|
|
1229
1229
|
action,
|
1230
1230
|
toggleAllRowsSelected,
|
1231
1231
|
generateColumn,
|
1232
|
-
throttleRowClick
|
1232
|
+
throttleRowClick,
|
1233
|
+
selectedRow
|
1233
1234
|
};
|
1234
1235
|
};
|
1235
1236
|
var DataTable = React5.forwardRef((props, ref) => {
|
@@ -1249,7 +1250,7 @@ var DataTable = React5.forwardRef((props, ref) => {
|
|
1249
1250
|
paddingRowX = 8
|
1250
1251
|
} = props;
|
1251
1252
|
const { clickOrDragged, getDragOrClickProps } = useDragOrClick();
|
1252
|
-
const { table, action, throttleRowClick, toggleAllRowsSelected, generateColumn } = useDataTable(props);
|
1253
|
+
const { table, action, throttleRowClick, toggleAllRowsSelected, generateColumn, selectedRow } = useDataTable(props);
|
1253
1254
|
const refTable = React5.useRef(null);
|
1254
1255
|
React5.useImperativeHandle(ref, () => ({
|
1255
1256
|
toggleAllRowsSelected
|
@@ -1393,7 +1394,7 @@ var DataTable = React5.forwardRef((props, ref) => {
|
|
1393
1394
|
),
|
1394
1395
|
/* @__PURE__ */ jsx24(Tbody, { ...styles == null ? void 0 : styles.tableBody, children: table.getRowModel().rows.map((row, index) => {
|
1395
1396
|
const isDisabledRow = disabledRow && disabledRow(row.original);
|
1396
|
-
const isHighlightedRow = highlightedRow && highlightedRow(row.original);
|
1397
|
+
const isHighlightedRow = Object.keys(selectedRow != null ? selectedRow : {}).filter((key) => selectedRow == null ? void 0 : selectedRow[key]).includes(row.id) || highlightedRow && highlightedRow(row.original);
|
1397
1398
|
return /* @__PURE__ */ jsx24(
|
1398
1399
|
Tr,
|
1399
1400
|
{
|
@@ -7551,12 +7552,12 @@ var baseStyle11 = definePartsStyle10({
|
|
7551
7552
|
td: {
|
7552
7553
|
backgroundColor: "neutral.100"
|
7553
7554
|
}
|
7554
|
-
},
|
7555
|
-
'&[data-active="true"]': {
|
7556
|
-
td: {
|
7557
|
-
backgroundColor: "neutral.200"
|
7558
|
-
}
|
7559
7555
|
}
|
7556
|
+
// '&[data-active="true"]': {
|
7557
|
+
// td: {
|
7558
|
+
// backgroundColor: 'neutral.200',
|
7559
|
+
// },
|
7560
|
+
// },
|
7560
7561
|
}
|
7561
7562
|
}
|
7562
7563
|
}
|