英文:
How to disable Material UI DataGrid go to next page button while loading the API
问题
这段代码涉及到 Material UI Datagrid,我需要在加载API时禁用"Go to next page"按钮。
<DataGrid
autoHeight
getRowHeight={getRowHeight}
rows={rows}
columns={columns}
page={page - 1}
rowCount={total}
rowsPerPageOptions={rowsPerPage}
pagination
paginationMode='server'
pageSize={pageSize}
getRowClassName={(params) => getRowClassName(params)}
onPageChange={(newPage) => handelPageChange(newPage)}
loading={isLoading}
// disableNextPage={isLoading}
onPageSizeChange={(newPageSize) =>
setAssetList((prevState) => ({
...prevState,
pageSize: newPageSize,
}))
}
/>
英文:
This code is regarding Material UI Datagrid
I need to disable the Go to next page button while loading the API
<DataGrid
autoHeight
getRowHeight={getRowHeight}
rows={rows}
columns={columns}
page={page - 1}
rowCount={total}
rowsPerPageOptions={rowsPerPage}
pagination
paginationMode='server'
pageSize={pageSize}
getRowClassName={(params) => getRowClassName(params)}
onPageChange={(newPage) => handelPageChange(newPage)}
loading={isLoading}
// disableNextPage={isLoading}
onPageSizeChange={(newPageSize) =>
setAssetList((prveState) => ({
...prveState,
pageSize: newPageSize,
}))
}
/>
答案1
得分: 5
已使用此属性,它已被解决
hideFooterPagination={isLoading}
英文:
I have used this prop it has been resolved
hideFooterPagination={isLoading}
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论