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

FormSchema TreeSelect 组件 componentProps 改为函数方式后失效 #1300

Closed
Vfuryx opened this issue Oct 19, 2021 · 3 comments
Closed

Comments

@Vfuryx
Copy link

Vfuryx commented Oct 19, 2021

{
    field: 'company_id',
    label: '公司',
    component: 'TreeSelect',
    componentProps: {
      placeholder: '请选择公司',
    },
 },

正常
image

{
    field: 'company_id',
    label: '公司',
    component: 'TreeSelect',
    componentProps: () => {
      return {
        placeholder: '请选择公司',
      };
    },
  },

失败

image

onChange 也无法使用,请问是什么问题

@mick-xu
Copy link

mick-xu commented Dec 6, 2021

遇到同样的问题

@gwq123456
Copy link

gwq123456 commented Jan 5, 2022

在拿到树节点数据的时候可能已经调用过updateSchema处理过,它会覆盖掉schema默认写的。我也遇到这个问题,已经解决了。我之前的写法是:
P9C7NC9DXG5% CGLEH38E0E
我把这个地方删掉了,统一写在schema里边,如下:
image
这样就OK了

@anncwb
Copy link
Collaborator

anncwb commented May 6, 2024

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days

@anncwb anncwb added the Stale label May 6, 2024
@anncwb anncwb closed this as completed May 13, 2024
@vbenjs vbenjs locked and limited conversation to collaborators Aug 4, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants