如上图,这个table每一行都有1个input,现在我输入前两行input分别为11,22.我现在遇到的问题是:当我删除了第二行(input是22),最后前面的数据都删除了,但是input还是原来的,我现在的想法是先把table里的所有数据都删除了,在赋值,那么有什么方法可以清空所有的?比如form 有个方法是resetFields,table怎么办呢
欢迎选择我的课程,让我们一起见证您的进步~~
Fixing the Input in the Table with value can solve this problemvalue={row.price}
The table you display is generated from your data. Then the table will disappear if the data is empty. Or you can set a field in the data and hide the table when showTable,当值为false.
showTable
false
Fixing the Input in the Table with value can solve this problem
value={row.price}
The table you display is generated from your data.
Then the table will disappear if the data is empty.
Or you can set a field in the data and hide the table when
showTable
,当值为false
.