Skip to content

Commit 21d5c0c

Browse files
authored
Update README.md
1 parent d73b62b commit 21d5c0c

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

README.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,18 +82,23 @@ If you are going to be requesting a streaming or chunked response, use the `<Laz
8282
The `ScrollFollow` component accepts a render prop function which should return a component to render based on the
8383
function's arguments.
8484

85+
> [!NOTE]
86+
> ScrollFollow must be wrapped in an element that contains a fixed height such as a `<div>`
87+
8588
```jsx
8689
import React from "react";
8790
import { render } from "react-dom";
8891
import { LazyLog, ScrollFollow } from "@melloware/react-logviewer";
8992

9093
render(
94+
<div style={{ height: 500, width: 902 }}>
9195
<ScrollFollow
9296
startFollowing={true}
9397
render={({ follow, onScroll }) => (
9498
<LazyLog url="http://example.log" stream follow={follow} onScroll={onScroll} />
9599
)}
96-
/>,
100+
/>
101+
</div>,
97102
document.getElementById("root"),
98103
);
99104
```

0 commit comments

Comments
 (0)