【发布时间】:2022-11-15 02:41:57
【问题描述】:
我有一张如下表,我使用的是@material-table/core: 0.2.52 版本
<MaterialTable
isLoading={loading}
title=""
columns={[
{title: 'Track', field: 'track'},
{title: 'Tier', field: 'tier'},
{title: 'Architecture', field: 'architecture'},
{title: 'Archtier', field: 'archtier'},
{title: 'Lifecycle State', field: 'lifeCycleState'},
]}
data={data}
options={{
selection: true,
rowStyle: {
fontSize: '14px'
}
}}
localization={{
toolbar: {
nRowsSelected: '{0} application(s) selected'
},
body: {
emptyDataSourceMessage: `No applications found with owner email ${selectedEmail}`
}
}}
onSelectionChange={(rows) => onSelect(rows)}
/>
当我选择所有或单个行复选框时,我应该会在下面看到类似这样的内容(使用 (https://github.com/mbrn/material-table) 的屏幕截图
但我什么也没看到
我在这里错过任何选择吗?
我在 package.json 中的依赖项
"dependencies": {
"@emotion/react": "^11.10.4",
"@emotion/styled": "^11.10.4",
"@material-table/core": "^0.2.52",
"@mui/icons-material": "^5.10.6",
"@mui/lab": "^5.0.0-alpha.100",
"@mui/material": "^5.10.6",
"axios": "^0.27.2",
"filefy": "^0.1.11",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-google-charts": "^4.0.0",
"react-router-dom": "^6.4.0",
"react-scripts": "^5.0.1",
"sass": "^1.54.9"
}
【问题讨论】:
标签: reactjs material-ui material-table