Reputation: 1
I'm using DataGridPremium
with checkboxes enabled. The datagrid does not expand all the way to the edges of the encapsulating <Card>
(see screenshot #1) if I remove checkboxSelection
from DataGridPremium
it does expand to the edges of the card (see screenshot #2). Has anyone tried to solve this issue?
Here is an example:
import { DataGridPremium } from '@mui/x-data-grid-premium';
import { useDemoData } from '@mui/x-data-grid-generator';
export default function DataGridPremiumDemo() {
const { data, loading } = useDemoData({
dataSet: 'Commodity',
rowLength: 100,
editable: true,
visibleFields,
});
<DataGridPremium
{...data}
checkboxSelection
disableRowSelectionOnClick
/>
}
(Please note that you need DataGridPremium licence to be able to run this example.)
I tried adding a checkbox column settings by adding GRID_CHECKBOX_SELECTION_COL_DEF
in the column settings and it doesn't change a thing (except repositioning the checkbox column if I specify it as last column for ex.).
Upvotes: 0
Views: 18