sliftutils 0.16.0 → 0.17.0
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/index.d.ts +1 -0
- package/package.json +1 -1
- package/render-utils/Table.d.ts +1 -0
- package/render-utils/Table.tsx +3 -1
package/index.d.ts
CHANGED
package/package.json
CHANGED
package/render-utils/Table.d.ts
CHANGED
package/render-utils/Table.tsx
CHANGED
|
@@ -32,6 +32,8 @@ export class Table<RowT extends RowType> extends preact.Component<TableType<RowT
|
|
|
32
32
|
characterLimit?: number;
|
|
33
33
|
|
|
34
34
|
excludeEmptyColumns?: boolean;
|
|
35
|
+
|
|
36
|
+
rowClassName?: (row: RowT) => string
|
|
35
37
|
}> {
|
|
36
38
|
state = {
|
|
37
39
|
limit: this.props.initialLimit || 100,
|
|
@@ -65,7 +67,7 @@ export class Table<RowT extends RowType> extends preact.Component<TableType<RowT
|
|
|
65
67
|
</tr>
|
|
66
68
|
{rows.map((row, index) => (
|
|
67
69
|
<tr
|
|
68
|
-
className={(index % 2 === 1 && css.hsla(0, 0, 100, 0.25) || "")}
|
|
70
|
+
className={(this.props.rowClassName?.(row) || "") + (index % 2 === 1 && css.hsla(0, 0, 100, 0.25) || "")}
|
|
69
71
|
>
|
|
70
72
|
<td className={css.center}>{index + 1}</td>
|
|
71
73
|
{Object.entries(columns).filter(x => x[1] !== null).map(([columnName, column]: [string, ColumnType]) => {
|