diff --git a/examples/range.js b/examples/range.js index 3cae469ce..b8c1d6ffa 100644 --- a/examples/range.js +++ b/examples/range.js @@ -111,6 +111,25 @@ class ControlledRange extends React.Component { } } +class ControlledRangeDisableAcross extends React.Component { + constructor(props) { + super(props); + this.state = { + value: [20, 40, 60, 80], + }; + } + handleChange = (value) => { + this.setState({ + value, + }); + } + render() { + return ( + + ); + } +} + // https://github.com/react-component/slider/issues/226 class PureRenderRange extends React.Component { constructor(props) { @@ -154,6 +173,10 @@ ReactDOM.render(

Controlled Range

+
+

Controlled Range, not allow across

+ +

Multi Range

diff --git a/tests/setup.js b/tests/setup.js index 6eb7b8978..4ef4aadff 100644 --- a/tests/setup.js +++ b/tests/setup.js @@ -1,4 +1,4 @@ -global.requestAnimationFrame = global.requestAnimationFrame || function (cb) { +global.requestAnimationFrame = global.requestAnimationFrame || function _raf(cb) { return setTimeout(cb, 0); };