mirror of
https://github.com/wassname/slider.git
synced 2026-10-27 13:21:07 +08:00
fix: set recent default value correctly, close: #97
This commit is contained in:
1 parent
f4a82e3fd1
commit
ecbb253986
2 files changed
+4
-3
No files matched your search
+1
-1
@@ -95,7 +95,7 @@ ReactDOM.render(
|
||||
</div>
|
||||
<div style={style}>
|
||||
<p>Basic Range,`step=20` </p>
|
||||
<Slider range step={20} defaultValue={[20, 40]} onBeforeChange={log} />
|
||||
<Slider range step={20} defaultValue={[20, 20]} onBeforeChange={log} />
|
||||
</div>
|
||||
<div style={style}>
|
||||
<p>Basic Range,`step=20, dots` </p>
|
||||
|
||||
+3
-2
@@ -48,8 +48,9 @@ class Slider extends React.Component {
|
||||
if (props.range && upperBound === lowerBound) {
|
||||
if (lowerBound === max) {
|
||||
recent = 'lowerBound';
|
||||
}
|
||||
if (upperBound === min) {
|
||||
} else if (upperBound === min) {
|
||||
recent = 'upperBound';
|
||||
} else {
|
||||
recent = 'upperBound';
|
||||
}
|
||||
} else {
|
||||
|
||||
Reference in new issue
Block a user