Skip to content

Commit b870753

Browse files
committed
address even more comments
1 parent f650f29 commit b870753

File tree

1 file changed

+9
-10
lines changed

1 file changed

+9
-10
lines changed

src/cdk-experimental/scrolling/virtual-scroll.md

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,8 @@ memory you may wish to reduce this number to avoid spending too much memory on t
6161
</cdk-virtual-scroll-viewport>
6262
```
6363

64-
#### Specifying items with an Observable or DataSource
65-
`*cdkVirtualFor` is set up to accept data from an `Array`, `Observable`, or `DataSource`. The
64+
#### Specifying data
65+
`*cdkVirtualFor` accepts data from an `Array`, `Observable<Array>`, or `DataSource`. The
6666
`DataSource` for the virtual scroll is the same one used by the table and tree components. A
6767
`DataSource` is simply an abstract class that has two methods: `connect` and `disconnect`. The
6868
`connect` method will be called by the virtual scroll viewport to receive a stream that emits the
@@ -71,11 +71,11 @@ destroyed, which may be the right time to clean up any subscriptions that were r
7171
connect process.
7272

7373
### Scrolling over fixed size items
74-
If you're scrolling over a list of items that are all the same fixed size, you can use the
75-
`FixedSizeVirtualScrollStrategy`. This can be easily added to your viewport using the `itemSize`
76-
directive. The fixed size viewport strategy is less flexible than the autosize strategy because it
77-
requires all items to be the same size, but the advantage of this constraint is that it allows for
78-
better performance, since items do not need to be measured as they are rendered.
74+
When all items are the same fixed size,, you can use the `FixedSizeVirtualScrollStrategy`. This can
75+
be easily added to your viewport using the `itemSize` directive. The fixed size viewport strategy is
76+
less flexible than the autosize strategy because it requires all items to be the same size, but the
77+
advantage of this constraint is that it allows for better performance, since items do not need to be
78+
measured as they are rendered.
7979

8080
```html
8181
<cdk-virtual-scroll-viewport itemSize="50">
@@ -96,9 +96,8 @@ beyond the edge of the viewport. This can be adjusted by setting the `bufferSize
9696
`minBufferPx` and `addBufferPx` like the autosize strategy**
9797

9898
### Scrolling over items with different sizes
99-
If you're scrolling over a list of items with different sizes, you can use the
100-
`AutoSizeVirtualScrollStrategy`. This can be added to your viewport by using the `autosize`
101-
directive.
99+
When the items have different or unknown sizes, you can use the `AutoSizeVirtualScrollStrategy`.
100+
This can be added to your viewport by using the `autosize` directive.
102101

103102
```html
104103
<cdk-virtual-scroll-viewport autosize>

0 commit comments

Comments
 (0)