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

fixFooter 判断不准确,导致 Summary 组件的 fixed 为 'top' 不符合预期 #1157

Open
Tangjj1996 opened this issue Jul 10, 2024 · 0 comments

Comments

@Tangjj1996
Copy link

Tangjj1996 commented Jul 10, 2024

const fixHeader = scroll && validateValue(scroll.y);

table/src/Table.tsx

Lines 376 to 380 in ef7afbc

const fixFooter =
(fixHeader || isSticky) &&
React.isValidElement(summaryNode) &&
summaryNode.type === Summary &&
(summaryNode.props as SummaryProps).fixed;

如果不给 Table 组件传 scorll.y 或 sticky 属性,那么 Summary 的 fixed 属性赋值为 'top' 是失效的,比如:

https://stackblitz.com/edit/react-gxnxdv?embed=1&file=demo.tsx

image

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

No branches or pull requests

1 participant