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
*`thumbSizeMin`: _(number)_ Minimal size of thumb in pixels _(default: 30)_
8
-
*`scrollDetectionThreshold`: _(number)_ Scroll process check interval in milliseconds _(default: 100)_
9
+
*`noScroll`: _(boolean)_ Disable both scrollings, vertical and horizontal _(default: false)_
10
+
*`scrollY`: _(boolean)_ If false, vertical scrolling will be disabled _(default: true)_
11
+
*`scrollX`: _(boolean)_ If false, horizontal scrolling will be disabled _(default: true)_
9
12
*`permanentScrollbars`: _(boolean)_ Display both, vertical and horizontal scrollbars permanently, in spite of scrolling possibility _(default: false)_
10
13
*`permanentScrollbarVertical`: _(boolean)_ Display vertical scrollbar permanently, in spite of scrolling possibility _(default: false)_
11
14
*`permanentScrollbarHorizontal`: _(boolean)_ Display horizontal scrollbar permanently, in spite of scrolling possibility _(default: false)_
15
+
*`scrollDetectionThreshold`: _(number)_ Scroll process check interval in milliseconds _(default: 100)_
12
16
*`contentSizeTrack`: _(boolean)_ Automatically check content's sizes to actualize the scrollbars. Useful when dom is changed not only by react. _(default: false)_
13
17
*`contentSizeTrackInterval`: _(number)_ Interval between content's size check, in milliseconds _(default: 200)_
14
18
***Rendering**
@@ -29,8 +33,8 @@ All of these event handlers will be called inside the animation frame
Copy file name to clipboardExpand all lines: docs/USAGE.md
+8-4Lines changed: 8 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -34,8 +34,12 @@ Component creates next structure:
34
34
</div>
35
35
```
36
36
37
+
### Scroll disabling
38
+
The most common need is to disable scrolling fully or partially. You can do it simply adding `noScroll` to disable all scrolls and `scrollY={false}`/`scrollX={false}` to disable scrolls separately.
39
+
Note, that if `scrollY={false}` and `scrollX={false}` will be set simultaneously, it will be treated like `noScroll={true}`.
40
+
37
41
### Default styles
38
-
To customize scrollbars as you wish - you can turn off default styles.
42
+
To customize scrollbars as you wish - you may want to turn off default styles.
39
43
```javascript
40
44
importReact, { Component } from'react';
41
45
importScrollbarfrom'react-scrollbar-custom';
@@ -85,8 +89,8 @@ class App extends Component
85
89
}
86
90
```
87
91
88
-
### Automatic size checks
89
-
It is possible that DOM will be changed not only with React: for these cases `<Scrollbar />` has automatic content checker.
92
+
### Automatic size tracking
93
+
It is possible that DOM will be changed not only with React: for these cases `<Scrollbar />` has automatic content tracker.
90
94
```javascript
91
95
importReact, { Component } from'react';
92
96
importScrollbarfrom'react-scrollbar-custom';
@@ -100,4 +104,4 @@ class App extends Component
100
104
}
101
105
}
102
106
```
103
-
Now `<Scrollbar/>` will check content's sizes every 500ms and trigger `Scrollbar.update()` if they're changed.
107
+
Now `<Scrollbar/>` will check content's sizes every 500ms and trigger `Scrollbar.update()` if they're changed.
0 commit comments