AllenFang / react-bootstrap-table

A Bootstrap table built with React.js
https://allenfang.github.io/react-bootstrap-table/
MIT License
2.23k stars 782 forks source link

Remote Cell edit does not work #2003

Closed MaxPflueger closed 6 years ago

MaxPflueger commented 6 years ago

I tried to copy the remote edit cell example but it does not work. The value to be set is always undefined.

updateDocument = (row, fieldName, value) =>{ const { measurements } = this.state; let rowIdx; const targetRow = measurements.find((prod, i) => { if (prod.date === row.date) { rowIdx = i; return true; } return false; }); if (targetRow) { targetRow[fieldName] = parseInt(value); measurements[rowIdx] = targetRow; this.setState({ measurements }); } }