fix: should trigger event after the value is changed

This commit is contained in:
Benjy Cui
2015-11-18 14:32:56 +08:00
parent 1e430ba694
commit 0566e7f098
+3
View File
@@ -182,6 +182,9 @@ class Slider extends React.Component {
recent: valueNeedChanging,
});
const oldValue = state[valueNeedChanging];
if (value === oldValue) return;
const props = this.props;
// If it is not controlled component
if (!('value' in props) && !('index' in props)) {