我想知道如何在反应中调整材料表列的大小。请帮我。我试过下面的代码
options={{
sorting:false,
resizable:true,
我想知道如何在反应中调整材料表列的大小。请帮我。我试过下面的代码
options={{
sorting:false,
resizable:true,
此功能包含在付费的 DATAGRID-PRO 下
我发现指定单元格样式有助于操作列大小
{
field: 'Resizing',
title: 'Column Width',
cellStyle: {
whiteSpace: 'nowrap',
width: '20%',
},
},
There is no resize path in material-ui table. you can use material-ui Data grid -(Demo Link): https://material-ui.com/components/data-grid/demo/#data-grid-demo.
Or
You can rewrite the existing material-ui table style like :
.MuiTableHead-root .MuiTableRow-root .MuiTableCell-head {
font-weight: bold;
resize: horizontal;
overflow-x: overlay;
overflow-y: hidden;
border-right: 1px solid;
}
材质 UI 数据网格列调整大小不起作用。
[
{ field: 'id', header: 'id'},
{ field: 'count', header: 'Count', type: 'number'},
{ field: 'total', header: 'Total', type: 'number'}
];
默认情况下,resize 应该为 true