Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: fix FormList Operation type definitions #22058

Merged
merged 1 commit into from Mar 10, 2020
Merged

fix: fix FormList Operation type definitions #22058

merged 1 commit into from Mar 10, 2020

Conversation

kagawagao
Copy link
Contributor

@kagawagao kagawagao commented Mar 10, 2020

馃 This is a ...

  • New feature
  • Bug fix
  • Site / document update
  • Component style update
  • TypeScript definition update
  • Refactoring
  • Code style optimization
  • Test Case
  • Branch merge
  • Other (about what?)

馃敆 Related issue link

馃挕 Background and solution

https://github.com/react-component/field-form/blob/bc56d70cd291b64c12cffac8bb265f268d630864/src/List.tsx#L13-L17

interface ListOperations {
  add: (defaultValue?: StoreValue) => void;
  remove: (index: number) => void;
  move: (from: number, to: number) => void;
}

馃摑 Changelog

Language Changelog
馃嚭馃嚫 English
馃嚚馃嚦 Chinese

鈽戯笍 Self Check before Merge

鈿狅笍 Please check all items below before review. 鈿狅笍

  • Doc is updated/provided or not needed
  • Demo is updated/provided or not needed
  • TypeScript definition is updated/provided or not needed
  • Changelog is provided or not needed

@ant-design-bot
Copy link
Contributor

@ant-design-bot ant-design-bot commented Mar 10, 2020

@kagawagao
Copy link
Contributor Author

@kagawagao kagawagao commented Mar 10, 2020

maybe rc-field-form export ListOperations is much better

@codesandbox-ci
Copy link

@codesandbox-ci codesandbox-ci bot commented Mar 10, 2020

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 35e2aa6:

Sandbox Source
antd reproduction template Configuration

@codecov
Copy link

@codecov codecov bot commented Mar 10, 2020

Codecov Report

Merging #22058 into master will decrease coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #22058      +/-   ##
==========================================
- Coverage   97.96%   97.96%   -0.01%     
==========================================
  Files         306      306              
  Lines        7039     7038       -1     
  Branches     1937     1938       +1     
==========================================
- Hits         6896     6895       -1     
  Misses        143      143              
Impacted Files Coverage 螖
components/form/FormList.tsx 100.00% <100.00%> (酶)

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 f21b468...35e2aa6. Read the comment docs.

fields.map(field => ({ ...field, fieldKey: field.key })),
operation,
);
return children(fields.map(field => ({ ...field, fieldKey: field.key })), operation);
Copy link
Member

@afc163 afc163 Mar 10, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks no change at all.

Copy link
Contributor Author

@kagawagao kagawagao Mar 10, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this line is auto formatted, based on prettier rule

@afc163 afc163 merged commit 639cede into ant-design:master Mar 10, 2020
20 checks passed
@kagawagao kagawagao deleted the fix-form-list-type-definitions branch Mar 10, 2020
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.

None yet

3 participants