Skip to content

Conversation

zombieJ
Copy link
Member

@zombieJ zombieJ commented Jun 12, 2019

Simplify render logic:

<Form>
  <Field name="field_1">
    <input />
  </Field>
  <Field dependencies={['field_1']}>
    {(_, _, { getFieldValue }) => (
      getFieldValue('field_1') === 'aaa' &&
      <Field name="field_1">
        <input />
      </Field>
    )}
  </Field>
</Form>

@vercel
Copy link

vercel bot commented Jun 12, 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-deps.react-component.now.sh

@codecov
Copy link

codecov bot commented Jun 12, 2019

Codecov Report

Merging #6 into master will increase coverage by 6.89%.
The diff coverage is 85.71%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master       #6      +/-   ##
==========================================
+ Coverage   69.25%   76.14%   +6.89%     
==========================================
  Files          13       13              
  Lines         631      633       +2     
  Branches      105      108       +3     
==========================================
+ Hits          437      482      +45     
+ Misses        194      151      -43
Impacted Files Coverage Δ
src/useForm.ts 74.03% <100%> (+8.65%) ⬆️
src/Field.tsx 86.33% <75%> (+8.95%) ⬆️
src/utils/valueUtil.ts 70.17% <0%> (+14.03%) ⬆️
src/utils/NameMap.ts 68.96% <0%> (+17.24%) ⬆️

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 dfc4a0f...54b1f29. Read the comment docs.

@zombieJ zombieJ requested a review from afc163 June 12, 2019 14:38
@zombieJ zombieJ merged commit ac52393 into master Jun 12, 2019
@delete-merged-branch delete-merged-branch bot deleted the deps branch June 12, 2019 15:03
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