formily icon indicating copy to clipboard operation
formily copied to clipboard

第一次异步加载feild的enum出现空值

Open czbczb opened this issue 7 years ago • 5 comments

Help us to manage our issues by answering the following:

  1. How would you tag this issue?
  • Bug
  1. Describe your issue: 第一次异步加载feild的enum设置后仍然是空, image

但是初始化时设置固定值是正常的, image

           ```

$('onFormInit').subscribe(() => { hide('id'); // 异步加载 onLoadAssociateOriginData(); // 设置固定值可以 setEnum('IDCid', [ {label: "DZM", value: "1"}, {label: "JXQ", value: "2"}, {label: "YJ", value: "3"}, {label: "THQ", value: "4"}, {label: "SH", value: "6"}, {label: "FS", value: "7"}, {label: "GFR", value: "8"} ]); })


3. If your issue is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem via [Bug Report Template](https://codesandbox.io/s/1ry7zxv983) on CodeSandbox
.

czbczb avatar Sep 29 '19 06:09 czbczb

please help me

czbczb avatar Sep 29 '19 06:09 czbczb

麻烦给个可复现的codesandbox链接

janryWang avatar Sep 29 '19 07:09 janryWang

image 我找到什么原因,value设置不能放到enum的前面或者不写,都会 导致这个原因, 根本原因有待研究

czbczb avatar Sep 29 '19 09:09 czbczb

@czbczb 请教一下,这个问题,你是在setEnum后加上这个setValue('field_name',null)就解决了么?

fanxiaokun avatar Sep 29 '19 09:09 fanxiaokun

@fanxiaokun 我也没有搞明白,有更好的方法么?

czbczb avatar Oct 16 '19 09:10 czbczb