Skip to content

Commit cdfddc3

Browse files
authored
fix: TestRunList. Rows per page select does not work (#267)
1 parent 89ec94a commit cdfddc3

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/components/TestRunList/index.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,8 @@ const TestRunList: React.FunctionComponent = () => {
103103
const { selectedBuild } = useBuildState();
104104
const testRunDispatch = useTestRunDispatch();
105105

106+
const [pageSize, setPageSize] = React.useState<number>(10);
107+
106108
const [sortModel, setSortModel] = React.useState<GridSortModel>([
107109
{
108110
field: "status",
@@ -136,8 +138,10 @@ const TestRunList: React.FunctionComponent = () => {
136138
<DataGrid
137139
rows={testRuns}
138140
columns={columnsDef}
139-
pageSize={10}
141+
pageSize={pageSize}
140142
rowsPerPageOptions={[10, 20, 30]}
143+
onPageSizeChange={(newPageSize) => setPageSize(newPageSize)}
144+
pagination
141145
loading={loading}
142146
components={{
143147
Toolbar: DataGridCustomToolbar,

0 commit comments

Comments
 (0)