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(core): fix empty string or number can not rewrite default value #2906

Conversation

janryWang
Copy link
Collaborator

@janryWang janryWang commented Mar 6, 2022

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


What have you changed?

Fixed #2901
Fixed #2629

@codecov
Copy link

codecov bot commented Mar 6, 2022

Codecov Report

Merging #2906 (55bda29) into formily_next (b226760) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@              Coverage Diff              @@
##           formily_next    #2906   +/-   ##
=============================================
  Coverage         95.99%   95.99%           
=============================================
  Files               148      148           
  Lines              6369     6372    +3     
  Branches           1709     1712    +3     
=============================================
+ Hits               6114     6117    +3     
  Misses              255      255           
Impacted Files Coverage Δ
packages/core/src/shared/internals.ts 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 b226760...55bda29. Read the comment docs.

@github-actions
Copy link
Contributor

github-actions bot commented Mar 6, 2022

Size Change: +51 B (0%)

Total Size: 502 kB

Filename Size Change
packages/core/dist/formily.core.umd.development.js 19.7 kB +28 B (0%)
packages/core/dist/formily.core.umd.production.js 13.3 kB +23 B (0%)
ℹ️ View Unchanged
Filename Size
packages/antd/dist/formily.antd.umd.development.js 69.9 kB
packages/antd/dist/formily.antd.umd.production.js 39.5 kB
packages/element/dist/formily.element.umd.development.js 62.7 kB
packages/element/dist/formily.element.umd.production.js 36.4 kB
packages/grid/dist/formily.grid.umd.development.js 9.02 kB
packages/grid/dist/formily.grid.umd.production.js 6.08 kB
packages/json-schema/dist/formily.json-schema.umd.development.js 6.88 kB
packages/json-schema/dist/formily.json-schema.umd.production.js 4.36 kB
packages/next/dist/formily.next.umd.development.js 75.4 kB
packages/next/dist/formily.next.umd.production.js 44.2 kB
packages/path/dist/formily.path.umd.development.js 11.1 kB
packages/path/dist/formily.path.umd.production.js 7.7 kB
packages/react/dist/formily.react.umd.development.js 11.4 kB
packages/react/dist/formily.react.umd.production.js 7.09 kB
packages/reactive-react/dist/formily.reactive-react.umd.development.js 3.61 kB
packages/reactive-react/dist/formily.reactive-react.umd.production.js 2.25 kB
packages/reactive-vue/dist/formily.reactive-vue.umd.development.js 2.92 kB
packages/reactive-vue/dist/formily.reactive-vue.umd.production.js 1.83 kB
packages/reactive/dist/formily.reactive.umd.development.js 9.31 kB
packages/reactive/dist/formily.reactive.umd.production.js 5.21 kB
packages/shared/dist/formily.shared.umd.development.js 7.2 kB
packages/shared/dist/formily.shared.umd.production.js 4.17 kB
packages/validator/dist/formily.validator.umd.development.js 8.42 kB
packages/validator/dist/formily.validator.umd.production.js 6.25 kB
packages/vue/dist/formily.vue.umd.development.js 16.4 kB
packages/vue/dist/formily.vue.umd.production.js 9.74 kB

compressed-size-action

@janryWang janryWang merged commit b6c3e31 into formily_next Mar 6, 2022
@janryWang janryWang deleted the fix_empty_string_or_number_can_not_rewrite_default_value branch March 6, 2022 11:09
@haoliangwu
Copy link

haoliangwu commented May 25, 2022

it seems that the fixing commit is missing in the current formily_next branch, is that expected?

okay, my bad, the typo in git sha. sorry for that.

I met a similar issue of #2901, anyway, the root cause seems like form.setValues API ignored the empty string. I will debug and submit a new issue about it.

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.

[Bug Report] 默认值逻辑 [Bug Report] schema 里的 default 值会覆盖原来的空字符串
2 participants