@carto/ps-react-ui 4.3.8 → 4.3.9
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/types/widgets/table/components/cell.d.ts +4 -2
- package/dist/types/widgets/table/types.d.ts +1 -1
- package/dist/widgets/table.js +241 -240
- package/dist/widgets/table.js.map +1 -1
- package/package.json +1 -1
- package/src/widgets/table/components/cell.tsx +5 -3
- package/src/widgets/table/components/row.tsx +6 -1
- package/src/widgets/table/types.ts +1 -1
|
@@ -1,10 +1,12 @@
|
|
|
1
|
-
import { TableColumn } from '../types';
|
|
1
|
+
import { TableColumn, TableRow } from '../types';
|
|
2
2
|
/**
|
|
3
3
|
* Props for Cell component
|
|
4
4
|
*/
|
|
5
5
|
export interface CellProps {
|
|
6
6
|
/** Column definition */
|
|
7
7
|
column: TableColumn;
|
|
8
|
+
/** Full table row for context */
|
|
9
|
+
row: TableRow;
|
|
8
10
|
/** Cell value */
|
|
9
11
|
value: unknown;
|
|
10
12
|
}
|
|
@@ -13,4 +15,4 @@ export interface CellProps {
|
|
|
13
15
|
* Markdown is rendered when the raw value is a string and no formatter is defined.
|
|
14
16
|
* If a formatter is used, its output is rendered directly without markdown parsing.
|
|
15
17
|
*/
|
|
16
|
-
export declare function Cell({ column, value }: CellProps): import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
export declare function Cell({ column, row, value }: CellProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -25,7 +25,7 @@ export interface TableColumn {
|
|
|
25
25
|
/** Enable sorting for this column */
|
|
26
26
|
sortable?: boolean;
|
|
27
27
|
/** Custom cell value formatter */
|
|
28
|
-
formatter?: (value: unknown) => ReactNode;
|
|
28
|
+
formatter?: (value: unknown, row: TableRow) => ReactNode;
|
|
29
29
|
}
|
|
30
30
|
/**
|
|
31
31
|
* Table row data - extends Record for flexible data
|