this isnt doing the trick. no error is produced on the console, but refreshing the page just brings back the previous value. replacing null
with any other data befitting the column works as intended.
valueSetter: params => {
params.data.column = null;
return true;
}
just for fun, ive also tried the following. but no update occurs and no error appears on the console.
valueSetter: async params => {
await pool.query("UPDATE table SET column = NULL WHERE otherColumn = 'value';");
return true;
}
it appears to require a combination of both my previous attempts in the following order.
valueSetter: params => {
params.data.column = null;
await pool.query("UPDATE table SET column = NULL WHERE otherColumn = 'value';");
return true;
}