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
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -27,6 +27,7 @@ The `overflow` default value of `auto` is applied via `style`. So, if you want t
27
27
-`overflow` - You can set this to `auto` or `scroll` ("auto" is the default).
28
28
-`row` - Your row component.
29
29
-`rowHeight` - Starting row height (100 by default) - it starts with this as an estimate for all rows, and then measures and caches the actual height of each row is as you scroll.
30
+
-`startAt` - You can pass an index to start the list at (0 by default).
30
31
-`style` - A style object applied to the component if you prefer using inline styling instead of css.
31
32
-`...rowProps` - Any additional props you pass will be applied to your row components, for example `onClick`.
32
33
@@ -38,6 +39,7 @@ import ReactSmartScroll from 'react-smart-scroll';
38
39
data={data}
39
40
overflow="scroll"
40
41
row={TestRow}
42
+
startAt={5}
41
43
onClick={() =>console.log('Hello!')} // passed to row components
42
44
label="My text is: "// passed to row components
43
45
/>
@@ -67,9 +69,7 @@ Unlike other virtual scrolling components/libraries out there, there are no unne
67
69
#### Firefox Note
68
70
The latest version of Firefox doesn't seem to keep up with React's rendering speed with `useLayoutEffect()` or `useEffect()`, so if you grab the scrollbar and scroll up and down really fast, you'll see blank space momentarily. Other browsers don't appear to have this problem. Using the mouse wheel to scroll looks good in all browsers.
69
71
70
-
## Future Stuff
71
-
I'm working on the ability to scroll to a specific row in the list programmatically.
72
-
72
+
## Closing Note
73
73
I hope you enjoy using this component as much as I enjoyed making it!
0 commit comments