React MUI startCellEditMode function isn't working

Viewed 15

I have a Datagrid in MUI in which each button has an edit button. I implemented the edit buttons in the actions of a column definition.

As I see in docs, MUI has a startCellEditMode function which could use as:

  const handleEditClick = (id: GridRowId) => () => {
    apiRef.current.startCellEditMode({ id, field: 'text' });
  };

Now I want to use this line of code onClick of my edit button, but it doesn't work and I get this error:

apiRef.current.startCellEditMode is not a function

my function is called correctly, but the corresponding cell doesn't go to the edit mode

0 Answers
Related