Skip to content

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

Open
@Tangjj1996

Description

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

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions