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
Original file line number
Diff line number
Diff line change
@@ -53,7 +53,7 @@ const MyComponent = () => {
53
53
54
54
## Features
55
55
56
-
- Compatible with React Bootstrap v1.0.0+ and Bootstrap 4;
56
+
- Compatible with React Bootstrap v1.0.0+ and Bootstrap 4+;
57
57
- Implemented using HTML5 `<input type="range">` element;
58
58
- A tooltip can be configured to automatically display on hover or be constantly visible;
59
59
- A custom tooltip formatter function can be provided.
@@ -66,8 +66,8 @@ const MyComponent = () => {
66
66
| Property | Type | Default | Description |
67
67
| --- | --- | --- | --- |
68
68
|`value`|`number`|| The current value of the slider. |
69
-
|`onChange`|`function`|| A callback fired when the range slider's value changes. |
70
-
|`onAfterChange`|`function`|| A callback fired after interaction with the slider has finished if the value has changed. |
69
+
|`onChange`|`function`|| A callback fired when the range slider's value changes. The callback's first argument is a `React.ChangeEvent`. The second argument is the slider's new value as a `number`. |
70
+
|`onAfterChange`|`function`|| A callback fired after interaction with the slider has finished if the value has changed. The callback function's signature is the same as for `onChange`. |
71
71
|`min`|`number`|`0`| The minimum value of the slider. |
72
72
|`max`|`number`|`100`| The maximum value of the slider. |
73
73
|`step`|`number`|`1`| The granularity with which the slider can step through values. |
@@ -79,8 +79,8 @@ const MyComponent = () => {
79
79
|`tooltipLabel`|`function`|| A function that returns the tooltip's content (either a string or element). The function's first argument is the current slider value. |
80
80
|`tooltipStyle`|`object`|| Style to be applied to tooltip div. |
81
81
|`tooltipProps`|`object`|| Properties applied to the tooltip's `<div>` element. |
82
-
|`inputProps`|`object`|| Properties applied to the `<input>` element. |
83
-
|`ref`|`ReactRef`|| If provided, ref will be forwarded to the underlying `<input>` element. |
82
+
|`inputProps`|`object`|| Properties applied to the `<input>` element. DEPRECATED: additional props added to the RangeSlider component's props will be passed to the underlying `<input>` element. |
83
+
|`ref`|`React.Ref<HTMLInputElement>`|| If provided, ref will be forwarded to the underlying `<input>` element. |
84
84
|`bsPrefix`|`string`|`'range-slider'`| Change the underlying component CSS base class name and modifier class names prefix. **This is an escape hatch** for working with heavily customized bootstrap css. |
0 commit comments