@apia/table 4.0.65 → 4.0.68
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.js +3 -8
- package/dist/index.js.map +1 -1
- package/package.json +7 -7
package/dist/index.js
CHANGED
|
@@ -2283,15 +2283,13 @@ const NoMemoAccordionElement = ({ row, rowIndex }) => {
|
|
|
2283
2283
|
const title = React.useMemo(() => {
|
|
2284
2284
|
if (row.title)
|
|
2285
2285
|
return row.title;
|
|
2286
|
-
if (Array.isArray(indexColumns))
|
|
2287
|
-
console.log(indexColumns);
|
|
2286
|
+
if (Array.isArray(indexColumns))
|
|
2288
2287
|
return indexColumns.map(
|
|
2289
2288
|
(current) => (
|
|
2290
2289
|
// eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
|
|
2291
2290
|
row.cells[current.index].title || row.cells[current.index].children
|
|
2292
2291
|
)
|
|
2293
2292
|
).join(" | ");
|
|
2294
|
-
}
|
|
2295
2293
|
return row.cells[0].title ?? row.cells[0].children;
|
|
2296
2294
|
}, [indexColumns, row.cells, row.title]);
|
|
2297
2295
|
const isSelected = useResponsiveTable(
|
|
@@ -2301,11 +2299,8 @@ const NoMemoAccordionElement = ({ row, rowIndex }) => {
|
|
|
2301
2299
|
(global) => global.responsiveTableSlice[name].focusedRow === rowIndex
|
|
2302
2300
|
);
|
|
2303
2301
|
const buttonProps = useMemo(() => {
|
|
2304
|
-
const htmlTitles =
|
|
2305
|
-
|
|
2306
|
-
if (columns[i].showInAccordionTitle && cell.isHtml) {
|
|
2307
|
-
htmlTitles.push(true);
|
|
2308
|
-
}
|
|
2302
|
+
const htmlTitles = row.cells.map((cell, i) => {
|
|
2303
|
+
return !!cell.isHtml && !!columns[i].showInAccordionTitle;
|
|
2309
2304
|
});
|
|
2310
2305
|
return {
|
|
2311
2306
|
title,
|