pro-components icon indicating copy to clipboard operation
pro-components copied to clipboard

🧐[问题]renderformitem返回自定义组件,form.values获取不到select搜集的数据,

Open huangnan20030709 opened this issue 1 year ago • 1 comments

提问前先看看:

https://github.com/ryanhanwu/How-To-Ask-Questions-The-Smart-Way/blob/main/README-zh_CN.md

🧐 问题描述

在column的item里,为什么当把select直接放到renderformitem能收集到,但是renderformitem返回自定义组件,form.values获取不到select搜集的数据,

💻 示例代码

image

image

🚑 其他信息

huangnan20030709 avatar Oct 22 '24 02:10 huangnan20030709

以下的 Issues 可能会帮助到你 / The following issues may help you

  • [#8811][🧐[问题]renderformitem返回自定义组件,form.values获取不到select搜集的数据,][100%]

github-actions[bot] avatar Oct 22 '24 02:10 github-actions[bot]

需要自己onchange下

{
  renderFormItem:(_, props)=>{
    const {onChange,value} = props.fieldProps || {};
    onChange?.(values);
  }
}

echoyl avatar Oct 25 '24 02:10 echoyl

谢谢你

huangnan20030709 avatar Oct 25 '24 02:10 huangnan20030709