javascript - ant-design中的table组件怎么清空里面所有的数据(包括别的组件比如input)
天蓬老师
天蓬老师 2017-04-18 10:55:17
0
2
638


如上图,这个table每一行都有1个input,现在我输入前两行input分别为11,22.
我现在遇到的问题是:当我删除了第二行(input是22),最后前面的数据都删除了,但是input还是原来的,我现在的想法是先把table里的所有数据都删除了,在赋值,那么有什么方法可以清空所有的?比如form 有个方法是resetFields,table怎么办呢

天蓬老师
天蓬老师

欢迎选择我的课程,让我们一起见证您的进步~~

reply all(2)
黄舟

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.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!