Skip to content

Commit ce0ee7a

Browse files
committed
Readme
1 parent c46dfec commit ce0ee7a

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,10 @@ The virtual scroller has three required props:
3535
- `renderers` is a map of component definitions objects or names for each item type.
3636
- `itemHeight` is the display height of the items in pixels used to calculate the scroll height and position.
3737

38+
The `renderers` map is an object containing a component definition for each possible value of the item type. **The component definition must have an `item` prop, that will get the item object to render in the scroller.**
39+
40+
Also, you need to set the size of the virtual-scroller element and the items elements (for example, with CSS). All items should have the same height to prevent display glitches.
41+
3842
There are additional props you can use:
3943

4044
- `typeField` to customize which field is used on the items to get their type and use the corresponding definition in the `renderers` map. The default is `'type'`.
@@ -55,7 +59,7 @@ The component template is structured like this:
5559
</main>
5660
```
5761

58-
If you set `contentTag` to `'table'`, the actual result in the DOM will bu the following:
62+
If you set `contentTag` to `'table'`, the actual result in the DOM will look like the following:
5963

6064
```html
6165
<div>
@@ -67,10 +71,6 @@ If you set `contentTag` to `'table'`, the actual result in the DOM will bu the f
6771
</div>
6872
```
6973

70-
The `renderers` map is an object containing a component definition for each possible value of the item type. **The component definition must have an `item` prop, that will get the item object to render in the scroller.**
71-
72-
Also, you need to set the size of the virtual-scroller element and the items elements (for example, with CSS). All items should have the same height to prevent display glitches.
73-
7474
> The browsers have a height limitation on DOM elements, it means that currently the virtual scroller can't display more than ~500k items depending on the browser.
7575
7676
# Example

0 commit comments

Comments
 (0)