You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -35,6 +35,10 @@ The virtual scroller has three required props:
35
35
-`renderers` is a map of component definitions objects or names for each item type.
36
36
-`itemHeight` is the display height of the items in pixels used to calculate the scroll height and position.
37
37
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
+
38
42
There are additional props you can use:
39
43
40
44
-`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:
55
59
</main>
56
60
```
57
61
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:
59
63
60
64
```html
61
65
<div>
@@ -67,10 +71,6 @@ If you set `contentTag` to `'table'`, the actual result in the DOM will bu the f
67
71
</div>
68
72
```
69
73
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
-
74
74
> 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.
0 commit comments