alibaba/formily

[Feature Request] 希望ArrayTab可以支持第一个元素的删除

Closed this issue · 3 comments

  • I have searched the issues of this repository and believe that this is not a duplicate.

What problem does this feature solve?

源码地址:

closable={index !== 0}

问题示例:https://antd.formilyjs.org/zh-CN/components/array-tabs

第一个删除不会很丑吗

@janryWang 不好意思,借用这个issue问个相关问题。如果ArrayTab只有一个object对象元素,但这个数组属性实际没有填写任何值,然而最终提交的values中仍会包含这个数组属性,相应的值是[{}]这样的。既然第一个元素删除不了的话,有没有什么其它办法能够避免出现[{}]这种值呢?或者得到一个空数组[]也可以

这个没法避免,因为渲染了第一项,要解决的话,可以考虑换一种交互形式