<DataGridPremium
  {...data}
  apiRef={apiRef}
  disableRowSelectionOnClick
  defaultGroupingExpansionDepth={-1}
  initialState={initialState}
  rowGroupingColumnMode="multiple"
  groupingColDef={(params) =>
    params.fields.includes('director')
      ? {
          leafField: 'title',
          mainGroupingCriteria: 'director',
        }
      : {}
  }
/>