1

This is my onRowAdd function, before adding the value in the table I'm testing if the values provided are true or not.

The Issue is that when input values are true, new data newData is added into the state, but the material table does not display them. It's added but not visible

Then when I clicked on the edit icon it shows me the values that were entered before but after saving it still, the values vanish. As shown in the image new row was added and action are also shown in it but material table is not displaying the values of the column.

'onRowAdd: newData =>'
    new Promise((resolve, reject) => {
        setTimeout(() => {
            handleTestConnection(newData)
            .then(isValid => {
                if (isValid) {
                    setData([...data, newData])
                    resolve();
                } else reject();
                    })
                }, 1000)
        })    

enter image description here

MuTanT46
  • 56
  • 6

1 Answers1

0

The problem was that there is a render property in material-table and I was passing an empty function to it why material-table was adding the values but was not displaying them.

MuTanT46
  • 56
  • 6