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)
})
The problem was that there was a render property on the material table and I was passing it an empty function whereby the material table was adding the values but not displaying them.