formily icon indicating copy to clipboard operation
formily copied to clipboard

x-rules 函数返回promise时校验结果显示有延时

Open kingzs70 opened this issue 7 years ago • 1 comments

Help us to manage our issues by answering the following:

  1. How would you tag this issue?
  • Bug
  1. Describe your issue:

x-rules 函数如果返回的promise,校验结果会在下次表达状态变更时才显示出来

  1. 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 on CodeSandbox

https://codesandbox.io/s/blissful-galileo-88xre

kingzs70 avatar May 28 '19 10:05 kingzs70

这个问题,核心还是因为debounce函数没有返回Promise导致的,它不会hold整个执行链,所以参考该例子,使用promise-debounce即可解决问题。https://codesandbox.io/s/nice-dubinsky-vz0pk

janryWang avatar May 31 '19 12:05 janryWang