@apia/table 4.0.46 → 4.0.50
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 +1 -0
- package/dist/index.js +19 -14
- package/dist/index.js.map +1 -1
- package/package.json +7 -7
package/dist/index.d.ts
CHANGED
|
@@ -105,6 +105,7 @@ type TResponsiveTableWithRendererElement<RendererPropsType extends Partial<Recor
|
|
|
105
105
|
};
|
|
106
106
|
type TResponsiveTableCell<RendererPropsType extends Partial<Record<keyof RendererPropsType, unknown>> = Record<string, unknown>> = {
|
|
107
107
|
children?: ReactNode;
|
|
108
|
+
isHtml?: boolean;
|
|
108
109
|
} & TResponsiveTableWithRendererElement<RendererPropsType> & Partial<Pick<HTMLTableCellElement, 'ariaLabel' | 'className' | 'colSpan' | 'id' | 'rowSpan' | 'title'>> & TColoredElement;
|
|
109
110
|
/**
|
|
110
111
|
* Cada celda admite un renderer, que recibe
|
package/dist/index.js
CHANGED
|
@@ -2298,12 +2298,16 @@ const NoMemoAccordionElement = ({ row, rowIndex }) => {
|
|
|
2298
2298
|
const isFocused = useResponsiveTable(
|
|
2299
2299
|
(global) => global.responsiveTableSlice[name].focusedRow === rowIndex
|
|
2300
2300
|
);
|
|
2301
|
-
const buttonProps = useMemo(
|
|
2302
|
-
() =>
|
|
2301
|
+
const buttonProps = useMemo(() => {
|
|
2302
|
+
const htmlTitles = row.cells.map((cell, i) => {
|
|
2303
|
+
return !!cell.isHtml && !!columns[i].showInAccordionTitle;
|
|
2304
|
+
});
|
|
2305
|
+
return {
|
|
2303
2306
|
title,
|
|
2304
2307
|
ariaLabel: title,
|
|
2305
2308
|
label: title,
|
|
2306
2309
|
checked: isSelected,
|
|
2310
|
+
isHtml: htmlTitles,
|
|
2307
2311
|
onChange: (isChecked) => {
|
|
2308
2312
|
const isMultiple = responsiveTableStore.getState().responsiveTableSlice[name].isMultiple;
|
|
2309
2313
|
responsiveTableStore.dispatch(
|
|
@@ -2326,18 +2330,19 @@ const NoMemoAccordionElement = ({ row, rowIndex }) => {
|
|
|
2326
2330
|
}
|
|
2327
2331
|
}
|
|
2328
2332
|
}
|
|
2329
|
-
}
|
|
2330
|
-
|
|
2331
|
-
|
|
2332
|
-
|
|
2333
|
-
|
|
2334
|
-
|
|
2335
|
-
|
|
2336
|
-
|
|
2337
|
-
|
|
2338
|
-
|
|
2339
|
-
|
|
2340
|
-
|
|
2333
|
+
};
|
|
2334
|
+
}, [
|
|
2335
|
+
columns,
|
|
2336
|
+
isFocused,
|
|
2337
|
+
isSelected,
|
|
2338
|
+
name,
|
|
2339
|
+
row.accordionButtonProps?.onUserPressEnter,
|
|
2340
|
+
row.accordionButtonProps?.rightButtons,
|
|
2341
|
+
row.cells,
|
|
2342
|
+
row.color,
|
|
2343
|
+
rowIndex,
|
|
2344
|
+
title
|
|
2345
|
+
]);
|
|
2341
2346
|
if (!Array.isArray(indexColumns) || !columns)
|
|
2342
2347
|
return null;
|
|
2343
2348
|
return /* @__PURE__ */ jsxs(AccordionItem, { id: row.id, buttonProps, children: [
|