Skip to content

DataViews: .dataviews-wrapper height: 100% doesn't resolve in flex layouts #76944

Closed

Description

@allilevine

Description

.dataviews-wrapper uses height: 100% which doesn't resolve when the parent container gets its height from flex-grow rather than an explicit height property. This causes the DataViews internal scroll container (.dataviews-layout__container) to never activate, so the table grows to full content height and overflows its container.

This affects any consumer that places DataViews inside a flex layout where the parent's height comes from flex — for example, inside the @wordpress/admin-ui Page component, where .admin-ui-page__content uses flex-grow: 1.

Steps to reproduce

  1. Place a <DataViews> component inside a flex column container where the parent gets its height from flex-grow: 1 (not an explicit height).
  2. Add enough data rows to exceed the available space.
  3. The table rows are clipped instead of scrolling within .dataviews-layout__container.

Expected behavior

The DataViews table should scroll internally via .dataviews-layout__container (overflow: auto; flex: 1; min-height: 0).

Actual behavior

.dataviews-wrapper's height: 100% doesn't resolve to a definite value, so it falls back to content height. The wrapper grows to fit all rows, .dataviews-layout__container has no bounded height, and overflow: auto never triggers.

Suggested fix

Change .dataviews-wrapper from:

.dataviews-wrapper {
  height: 100%;
}

to:

.dataviews-wrapper {
  height: 100%;
  flex-grow: 1;
  min-height: 0;
}

Adding flex-grow: 1; min-height: 0 makes the wrapper work correctly in flex layouts (filling remaining space) while keeping height: 100% for non-flex contexts.

Activity

  1. added
    [Feature] DataViewsWork surrounding upgrading and evolving views in the site editor and beyond
    on Mar 31, 2026
  2. added theissue type on Mar 31, 2026
  3. added a commit that references this issue on Mar 31, 2026
    bd044a0
  4. added a commit that references this issue on May 14, 2026
    fcd65bc
  5. added a commit that references this issue on May 25, 2026
    ea70737
  6. added a commit that references this issue on May 25, 2026
    21069e8
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

[Feature] DataViewsWork surrounding upgrading and evolving views in the site editor and beyond[Status] In ProgressTracking issues with work in progress

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions