Skip to content

Conversation

@zombieJ
Copy link
Member

@zombieJ zombieJ commented Jul 1, 2019

<FormProvider
  onFormFinish={(name, { values, forms }) => {
    if (name === 'form1') {
      forms.form2.setFieldsValue({ ... });
    }
  }}
>
  <Form name="form1">
    <Field name="name" rules={[{ required: true }]}>
      <Input />
    </Field>
  </Form>
  <Form name="form2" />
</FormProvider>

@zombieJ zombieJ requested a review from afc163 July 1, 2019 07:15
@codecov
Copy link

codecov bot commented Jul 1, 2019

Codecov Report

Merging #21 into master will increase coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #21      +/-   ##
==========================================
+ Coverage   99.85%   99.86%   +<.01%     
==========================================
  Files          13       13              
  Lines         706      718      +12     
  Branches      146      148       +2     
==========================================
+ Hits          705      717      +12     
  Misses          1        1
Impacted Files Coverage Δ
src/FieldContext.ts 100% <ø> (ø) ⬆️
src/FormContext.tsx 100% <100%> (ø) ⬆️
src/useForm.ts 99.57% <100%> (+0.01%) ⬆️
src/Form.tsx 100% <100%> (ø) ⬆️

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 b822055...9027ef7. Read the comment docs.

@vercel
Copy link

vercel bot commented Jul 1, 2019

This pull request is automatically deployed with Now.
To access deployments, click Details below or on the icon next to each push.

Latest deployment for this branch: https://rc-field-form-git-context.react-component.now.sh

@zombieJ zombieJ merged commit affa8d4 into master Jul 1, 2019
@delete-merged-branch delete-merged-branch bot deleted the context branch July 1, 2019 07:30
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.

2 participants