【发布时间】:2021-05-29 15:38:30
【问题描述】:
<DataGrid
className="list"
pagingation
rows={registeredClasses}
columns={this.getColumns()}
pageSize={10}
rowLength={10}
autoHeight
// sortModel={sortModel}
components={{
pagination:CustomPagination
}}
checkboxSelection
onSelectionChange={(newSelection) =>{
console.log(newSelection)
}}
/>
也尝试使用 onSelectionModelChange,只有当我点击行时才会发生选择,如果我点击复选框则不会发生
【问题讨论】:
-
@jharris711 的以下答案应该可以工作。