2

我想知道如何在反应中调整材料表列的大小。请帮我。我试过下面的代码


        options={{
         sorting:false,
         resizable:true,


4

4 回答 4

2

此功能包含在付费的 DATAGRID-PRO 下

于 2021-11-01T08:31:05.630 回答
1

我发现指定单元格样式有助于操作列大小

   {
        field: 'Resizing',
        title: 'Column Width',
        cellStyle: {
          whiteSpace: 'nowrap',
          width: '20%',
        },
   },
于 2021-11-22T20:34:21.153 回答
1

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;
}
于 2021-03-19T06:02:36.567 回答
1

材质 UI 数据网格列调整大小不起作用。

      [
      { field: 'id', header: 'id'},
      { field: 'count', header: 'Count', type: 'number'},
      { field: 'total', header: 'Total', type: 'number'}
       ];

默认情况下,resize 应该为 true

于 2021-10-29T13:31:54.137 回答