React Material-UI Datagrid error issue After building a App

370 Views Asked by At

I'm in trouble now. because of error below. Before building my App, A console is fine. but after building, A console logs error. enter image description here

as i think, it's cause is row data in Data-grid. because A console logs read-only error. the row data is read-only array. so i think it's problematic. please help me..! thank you have a good day guys

my Data-grid code

        <DataGrid
      rows={Array.from(chatListData)}
      columns={ChatRoomColumns}
      pageSize={10}
      rowHeight={75}
      sx={DataGridStyle}
      checkboxSelection
      selectionModel={selectionModel}
      onSelectionModelChange={onSelectionModelChange}
      disableSelectionOnClick
      filterMode="client"
      components={{
        Toolbar: () => <Headers data={chatListData} />,
        Pagination: () => (
          <Footer
            chatData={rowUrl}
            setRowUrl={setRowUrl}
            getList={getList}
          />
        ),
      }}
    />
1

There are 1 best solutions below

0
tjd On

Faced the same problem. I fixed it by downgrading the version of @material-ui/data-grid. I had 4.0.0-alpha.37 then downgraded to 4.0.0-alpha.35 and the issue was solved. Also, make sure the react version being used meets the @material-ui/data-grid dependency.