Skip to content

Conversation

zombieJ
Copy link
Member

@zombieJ zombieJ commented Apr 25, 2020

解决 useEffect 下调用 form 方法的 warning 问题。现在总是延迟检查。

useEffect(() => {
  if (visible) form.setFieldsValue({});
}, [visible]);

@zombieJ zombieJ requested a review from afc163 April 25, 2020 07:24
@vercel
Copy link

vercel bot commented Apr 25, 2020

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/react-component/field-form/hqe81och9
✅ Preview: https://field-form-git-delay-warning.react-component.now.sh

@codecov
Copy link

codecov bot commented Apr 25, 2020

Codecov Report

Merging #116 into master will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #116   +/-   ##
=======================================
  Coverage   99.88%   99.88%           
=======================================
  Files          13       13           
  Lines         862      864    +2     
  Branches      190      191    +1     
=======================================
+ Hits          861      863    +2     
  Misses          1        1           
Impacted Files Coverage Δ
src/useForm.ts 99.69% <100.00%> (+<0.01%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 17c8061...977192c. Read the comment docs.

@zombieJ zombieJ merged commit 51db9fb into master Apr 25, 2020
@delete-merged-branch delete-merged-branch bot deleted the delay-warning branch April 25, 2020 07:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant