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(form): 首次同步到 url 参数时也执行 syncToUrl #7741

Merged
merged 1 commit into from
Sep 29, 2023

Conversation

ldc-37
Copy link
Contributor

@ldc-37 ldc-37 commented Sep 27, 2023

现状
现有 syncToUrl 如果是函数,在组件初始化的时候并不会执行。而初始化时参数一定会带上翻页参数 current 和 pageSize。基于现有实现这俩参数将永远出现在 url 参数中(即使 syncToUrl 中配置为 undefined 也无效)。

解决方法
组件初始化同步 url 参数时也执行 syncToUrl 函数

@github-actions
Copy link

github-actions bot commented Sep 27, 2023

😭 Deploy PR Preview failed.

@codecov
Copy link

codecov bot commented Sep 27, 2023

Codecov Report

All modified lines are covered by tests ✅

Comparison is base (9e3e4d8) 97.99% compared to head (d1393ab) 97.99%.

❗ Current head d1393ab differs from pull request most recent head 545fb40. Consider uploading reports for the commit 545fb40 to get more accurate results

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #7741   +/-   ##
=======================================
  Coverage   97.99%   97.99%           
=======================================
  Files         298      298           
  Lines        9356     9356           
  Branches     3487     3487           
=======================================
  Hits         9168     9168           
  Misses        173      173           
  Partials       15       15           
Files Coverage Δ
packages/form/src/BaseForm/BaseForm.tsx 97.56% <100.00%> (ø)

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@chenshuai2144 chenshuai2144 merged commit f733b47 into ant-design:master Sep 29, 2023
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