RowContainer

February 6, 2026 · View on GitHub

Wrapper around Row items that optionally virtualizes scrolling lists via react-window and the shared InfiniteLoaderComponent.

Import

import { RowContainer } from "@docspace/ui-kit/components/rows";

Usage

<RowContainer manualHeight="480px" useReactWindow={false}>
  {rows}
</RowContainer>

Virtualized list with infinite loader

<RowContainer
  manualHeight="520px"
  itemHeight={56}
  itemCount={items.length}
  filesLength={items.length}
  hasMoreFiles={hasNextPage}
  fetchMoreFiles={({ startIndex, stopIndex }) =>
    loadMore(startIndex, stopIndex)
  }
>
  {items.map((item) => (
    <Row key={item.id} {...rowProps(item)} />
  ))}
</RowContainer>

Props

PropTypeDefaultDescription
childrenReact.ReactNode[]Rows rendered inside the container. When useReactWindow is true, they are passed to the shared InfiniteLoaderComponent.
manualHeightstringSets a fixed container height via the --manual-height CSS variable.
itemHeightnumber50Height of a single row; required for accurate virtualization when useReactWindow is enabled.
useReactWindowbooleantrueToggles virtualization. When false, children render directly without react-window.
idstring"rowContainer"DOM id applied to the wrapper.
classNamestringCustom class appended to the wrapper.
styleReact.CSSPropertiesInline styles for the wrapper. Works together with manualHeight.
onScroll() => voidCallback fired when the virtualized list scrolls.
filesLengthnumberCurrent number of loaded items; forwarded to InfiniteLoaderComponent.
itemCountnumberTotal item count known to the loader.
fetchMoreFiles(params: IndexRange) => Promise<void>Async loader fired by InfiniteLoaderComponent when more rows need to be fetched.
hasMoreFilesbooleanIndicates whether there are more items to request.
noSelectbooleanfalseWhen true, disables text selection inside the container via a helper class.