Skip to content

Table gets overflow scroll instead of auto when scroll is set #8441

@IceMooncake

Description

@IceMooncake

In Vue Ant Design (ant-design-vue), the table component currently applies overflow-y: scroll to the body when using the scroll prop, even when the content does not actually overflow vertically.
This leads to a phantom scrollbar space being reserved, which should not appear if there is no overflow. This behavior is inconsistent with expected semantics and also differs from ant-design/react where the issue was noted and discussed (see ant-design issue #29082)
GitHub
.

Expected Behavior

When scroll={{ y: X }} is configured, and the content height does not exceed X, the table should:

not reserve space for a vertical scrollbar

use overflow-y: auto instead of forcing scroll

This avoids unnecessary layout gaps and visual artifacts when no scrolling is actually possible.

Actual Behavior

The table always applies overflow-y: scroll, causing:

permanent blank space at the right side

visual inconsistency when content is short

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions