Skip to content

Commit 75f1624

Browse files
change show row count (#380)
* change show row count * sx
1 parent 290d7ce commit 75f1624

File tree

3 files changed

+17
-2
lines changed

3 files changed

+17
-2
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
# Changelog
2+
## [31.2.1] - 2025-09-16
3+
- ReportDataGrid - change showRowCount option to display below the grid.
24
## [31.2.0] - 2025-09-11
35
- ReportDataGrid, ReportDataGrids - add showRowCount option. Per report using Datagrid footer.
46
## [31.1.5] - 2025-09-05

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@linn-it/linn-form-components-library",
3-
"version": "31.2.0",
3+
"version": "31.2.1",
44
"private": false,
55
"main": "dist/index.cjs.js",
66
"module": "dist/index.esm.js",

src/components/ReportDataGrid.js

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ function ReportDataGrid({
176176
getRowHeight={() => (fixedRowHeight ? 30 : 'auto')}
177177
disableRowSelectionOnClick
178178
getRowClassName={getRowClass}
179-
hideFooter={report.results.length <= 100 && !showRowCount}
179+
hideFooter={report.results.length <= 100}
180180
sx={{
181181
[`& .${gridClasses.cell}`]: {
182182
py: 1,
@@ -194,6 +194,19 @@ function ReportDataGrid({
194194
}}
195195
/>
196196
</Grid>
197+
{showRowCount && report && report.results && (
198+
<Grid size={12} sx={{ mt: -1.25 }}>
199+
<Typography
200+
variant="body2"
201+
sx={{
202+
float: 'left',
203+
pl: 2
204+
}}
205+
>
206+
Number of rows: {report.results.length}
207+
</Typography>
208+
</Grid>
209+
)}
197210
</Grid>
198211
);
199212
}

0 commit comments

Comments
 (0)