diff --git a/docs/src/app/components/pages/components/sliders.jsx b/docs/src/app/components/pages/components/sliders.jsx index 77c8903770b84d..64cd719806ae13 100644 --- a/docs/src/app/components/pages/components/sliders.jsx +++ b/docs/src/app/components/pages/components/sliders.jsx @@ -23,12 +23,6 @@ class SlidersPage extends React.Component { header: 'required', desc: 'The name of the slider. Behaves like the name attribute of an input element.' }, - { - name: 'defaultValue', - type: 'number', - header: 'default: 0', - desc: 'The default value of the slider.' - }, { name: 'description', type: 'string', @@ -131,8 +125,8 @@ class SlidersPage extends React.Component { componentInfo={componentInfo}> - - + + diff --git a/docs/src/app/components/raw-code/sliders-code.txt b/docs/src/app/components/raw-code/sliders-code.txt index 47cb3c6e6c4f34..2dcb8ea847b2b1 100644 --- a/docs/src/app/components/raw-code/sliders-code.txt +++ b/docs/src/app/components/raw-code/sliders-code.txt @@ -1,8 +1,8 @@ //Default // With starting value - - + + // Disabled with fixed value diff --git a/src/slider.jsx b/src/slider.jsx index c0b2cfce7a1c06..c830c9953ac336 100644 --- a/src/slider.jsx +++ b/src/slider.jsx @@ -51,7 +51,6 @@ const Slider = React.createClass({ propTypes: { name: React.PropTypes.string.isRequired, - defaultValue: valueInRangePropType, description: React.PropTypes.string, disabled: React.PropTypes.bool, error: React.PropTypes.string, @@ -80,7 +79,6 @@ const Slider = React.createClass({ getDefaultProps() { return { - defaultValue: 0, disabled: false, max: 1, min: 0, @@ -92,7 +90,7 @@ const Slider = React.createClass({ getInitialState() { let value = this.props.value; if (value === undefined) { - value = this.props.defaultValue; + value = this.props.min; } let percent = (value - this.props.min) / (this.props.max - this.props.min); if (isNaN(percent)) percent = 0;