alibaba/formily

[Bug Report] void 类型的节点 visible 是 false,它的 properties 必填属性还是valid=false

tyy110171 opened this issue · 2 comments

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

Reproduction link

Edit on CodeSandbox

Steps to reproduce

ArrayTable设置column,父组件void设置visible:false,但是onSubmit方法会校验住

column4: {
                type: 'void',
                'x-component': 'ArrayTable.Column',
                'x-component-props': {
                  title: `{{ t('Message Category') }}`,
                },
                'x-visible': false,
                properties: {
                  messageLevel: {
                    type: 'string',
                    'x-decorator': 'FormItem',
                    'x-component': 'Select',
                    required: true,
                  },
                },
              },

What is expected?

Submit按钮校验成功

What is actually happening?

submit按钮校验失败

Package

@formily/core@2.3.0


ArrayTable 这个场景很特殊,items 这个节点并没有渲染,所以也没有建模,所以它的状态对子节点也不会有任何效果

这种不是bug吗,我们升级新版本之前是好的,原先我们用的2.2.3版本完全正常,升级到2.3.0才出现这个问题