<DataGrid
  rows={rows}
  columns={columns}
  onCellEditStop={(params, event) => {
    if (params.reason !== GridCellEditStopReasons.enterKeyDown) {
      return;
    }
    if (isKeyboardEvent(event) && !event.ctrlKey && !event.metaKey) {
      event.defaultMuiPrevented = true;
    }
  }}
/>