Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: 修复tabs 内的表单项无法设置 static 属性的问题 #6136

Merged
merged 1 commit into from
Feb 8, 2023

Conversation

CheshireJCat
Copy link
Collaborator

复现schema

{
  "type": "form",
  "body": [
    {
      "type": "tabs",
      "tabs": [
        {
          "title": "基本信息",
          "body": [
            {
              "type": "input-text",
              "name": "status",
              "label": "状态",
              "static": true
            }
          ]
        }
      ]
    }
  ]
}

bug原因:
Form中包含容器类组件时,
这些组件会将此处的disbaled、static 等属性继续下发至子组件,
导致SchemaRenderer中 props.static 覆盖 schema.static

以上schema 渲染tabs时,static: (control as Schema).static || props.static 的结果为 false,
下发后覆盖了表单项的 static ,从而导致了bug

@github-actions github-actions bot added bug Something isn't working fix labels Feb 3, 2023
@github-actions
Copy link

github-actions bot commented Feb 3, 2023

👍 Thanks for this!
🏷 I have applied any labels matching special text in your issue.

Please review the labels and make any necessary changes.

@nwind nwind merged commit 446bdee into baidu:master Feb 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working fix
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants