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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(path): fix segments match #1826

Merged
merged 1 commit into from
Jul 19, 2021
Merged

Conversation

satouriko
Copy link
Contributor

@satouriko satouriko commented Jul 19, 2021

Before submitting a pull request, please make sure the following is done...

  • Ensure the pull request title and commit message follow the Commit Specific in English.
  • Fork the repo and create your branch from master or formily_next.
  • If you've added code that should be tested, add tests!
  • If you've changed APIs, update the documentation.
  • Ensure the test suite passes (npm test).
  • Make sure your code lints (npm run lint) - we've done our best to make sure these rules match our internal linting guidelines.

Please do not delete the above content


I remembered why I used [...field.path.toArr(), name] instead of `${field.path}.${name}` while writing this document, #1727 (comment)

It was because events listening to pattern ${field.path}.${name} will fail to dispatch if the component is used as an item of an array field, so I usually avoid writing in this "recommended way". Here is a reproduce, https://codesandbox.io/s/objective-wilbur-n2fqe

@codecov
Copy link

codecov bot commented Jul 19, 2021

Codecov Report

Merging #1826 (6154f33) into formily_next (0b936b1) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@              Coverage Diff              @@
##           formily_next    #1826   +/-   ##
=============================================
  Coverage         92.64%   92.64%           
=============================================
  Files               135      135           
  Lines              6091     6095    +4     
  Branches           1513     1515    +2     
=============================================
+ Hits               5643     5647    +4     
  Misses              444      444           
  Partials              4        4           
Impacted Files Coverage Δ
packages/path/src/matcher.ts 93.43% <100.00%> (ø)
packages/path/src/shared.ts 51.78% <100.00%> (+3.70%) ⬆️

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 0b936b1...6154f33. Read the comment docs.

@janryWang janryWang merged commit 6e541dc into alibaba:formily_next Jul 19, 2021
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