Skip to content

Commit

Permalink
chore(docs): add note itemHeight for virtualization
Browse files Browse the repository at this point in the history
  • Loading branch information
ryo-manba committed Feb 11, 2025
1 parent a1cc378 commit 2a4d693
Show file tree
Hide file tree
Showing 3 changed files with 74 additions and 67 deletions.
2 changes: 2 additions & 0 deletions apps/docs/content/docs/components/autocomplete.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -337,6 +337,8 @@ The `maxListboxHeight` prop is used to set the maximum height of the listbox. Th

The `itemHeight` prop is used to set the height of each item in the listbox. This is required when using virtualization. By default, it's set to `32`.

> **Note**: If the height of the list items differs from the default due to `startContent` or other custom content, be sure to pass the correct value to `itemHeight` to prevent layout issues.
<CodeDemo title="Custom Item Height" files={autocompleteContent.virtualizationCustomItemHeight} />

### With Sections
Expand Down
2 changes: 1 addition & 1 deletion apps/docs/content/docs/components/listbox.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ function App() {

### Virtualization

Select supports virtualization, which allows efficient rendering of large lists by only rendering items that are visible in the viewport. You can enable virtualization by setting the `isVirtualized` prop to `true`.
Listbox supports virtualization, which allows efficient rendering of large lists by only rendering items that are visible in the viewport. You can enable virtualization by setting the `isVirtualized` prop to `true`.

<CodeDemo
title="Virtualization"
Expand Down
Loading

0 comments on commit 2a4d693

Please sign in to comment.