mirror of
https://github.com/wassname/slider.git
synced 2026-09-09 11:35:22 +08:00
fix: Slider should be a controlled component
This commit is contained in:
+2
-2
@@ -14,7 +14,7 @@ ReactDOM.render(
|
||||
<div>
|
||||
<div style={style}>
|
||||
<p>Slider with marks, `included=true`</p>
|
||||
<Slider marks={marks} defaultIndex={1} />
|
||||
<Slider marks={marks} onChange={log} defaultIndex={1} />
|
||||
</div>
|
||||
<div style={style}>
|
||||
<p>Slider with marks and steps, `included=true`</p>
|
||||
@@ -36,7 +36,7 @@ ReactDOM.render(
|
||||
</div>
|
||||
<div style={style}>
|
||||
<p>Range with marks and steps</p>
|
||||
<Slider range marks={marks} step={10} onChange={log} defaultIndex={[1,2]} />
|
||||
<Slider range marks={marks} step={10} defaultIndex={[1,2]} />
|
||||
</div>
|
||||
</div>
|
||||
, document.getElementById('__react-content'));
|
||||
|
||||
Reference in New Issue
Block a user