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(ApiSelect): ApiSelect首次选择值时仍然提示校验, fix #3065 #3071

Merged
merged 1 commit into from
Sep 26, 2023
Merged

fix(ApiSelect): ApiSelect首次选择值时仍然提示校验, fix #3065 #3071

merged 1 commit into from
Sep 26, 2023

Conversation

wangjue666
Copy link
Collaborator

@wangjue666 wangjue666 commented Sep 25, 2023

问题是出在ApiSelect change事件没有主动触发外部的change事件,导致首次Form.Item收集不到change的值

其次

if (NO_AUTO_LINK_COMPONENTS.includes(component)) {

 // TODO 自定义组件验证会出现问题,因此这里框架默认将自定义组件设置手动触发验证,如果其他组件还有此问题请手动设置autoLink=false
  if (NO_AUTO_LINK_COMPONENTS.includes(component)) {
    props.schema &&
      (props.schema.itemProps! = {
        autoLink: false,
        ...props.schema.itemProps,
      });
  }

再看下autoLink属性的作用 ApiSelect组件本就是单一元素节点,所以NO_AUTO_LINK_COMPONENTS的设置有些多余,故删去

image

@SanpLee
Copy link

SanpLee commented Jan 10, 2024

good

@vbenjs vbenjs locked and limited conversation to collaborators Aug 5, 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

Successfully merging this pull request may close these issues.

3 participants