I am currently exploring the idea of incorporating an intermediate state to row checkboxes based on the selection status of other checkboxes within a detailed panel. My approach involves crafting a custom checkbox component and implementing some logical checks to determine if the intermediate state should be set to true. However, I am facing an obstacle in accessing the specific row ID associated with the checkbox that is essential for this check. Despite searching extensively, I have not come across any method to pass additional information beyond the CheckboxProps provided by MUI, which unfortunately lacks row details. While there is an option called componentsProps that allows passing extra props to a component, I am yet to discover a way to transmit the particular row ID to its respective checkbox. Is there anyone who might have a solution to this predicament?
.
.
.
const customCheckbox = (props: CheckboxProps) => {
return <Checkbox {...props} indeterminate={someArray.includes(theRowIdThisCheckboxIsUsedIn)} />
};
<DataGridPro
{...data}
components={{
BaseCheckbox: customCheckbox,
}}
/>