8000 fix: useAntdTable在manual=true的情况下,defaultParam不会填充表单默认值 by askwuxue · Pull Request #2594 · alibaba/hooks · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

fix: useAntdTable在manual=true的情况下,defaultParam不会填充表单默认值 #2594

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

Merged
merged 4 commits into from
Sep 26, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/hooks/src/useAntdTable/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ const useAntdTable = <TData extends Data, TParams extends Params>(
run(...params);
return;
}
if (!manual && ready) {
Copy link

Choose a reason for hiding this comment

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

这个改动有问题吧。去掉了manual的判断,手动模式就无效了,会把默认参数给到ref,并且发起默认值的请求,只有pageSize和current了。

Copy link
Collaborator

Choose a reason for hiding this comment

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

。。。。 来个 pr 改进一下

Choose a reason for hiding this comment

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

遇到同样问题

if (ready) {
allFormDataRef.current = defaultParams?.[1] || {};
restoreForm();
_submit(defaultParams?.[0]);
Expand Down
Loading
0