Using antd table to make a table, each row is editable, because I organized the code according to the official writing method, so please refer to the official document for the specific code, click here--->> https ://ant.design/components...
If you want to save the edited data to the server, you must first obtain the data after successful editing. At first, it was obtained through editDone(), but it later proved that the data after successful editing could not be obtained in this method;
Turn to the cell's handleChange(), where you can indeed get the data after successful editing, but this method is called in a loop, and many operations are confused.
How do you upload the edited data to the server?
I tried the antd example, and I can get the edited value in EditableCell,
There is a handleChange method that monitors changes in the input value and changes the state value in real time,
So in editDone,
I have dealt with an editable table. The requirement is an edit button and a submit button, so use <Form> to wrap <Table>