-
-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Description
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