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)
})
Via Active questions tagged javascript - Stack Overflow https://ift.tt/cVEMHn7
Comments
Post a Comment