rmc-picker
Advanced tools
Comparing version 0.2.1 to 0.2.2
@@ -67,2 +67,10 @@ 'use strict'; | ||
}, | ||
onCancel: function onCancel() { | ||
this.setOpenState(false); | ||
if (this.props.onCancel) { | ||
this.props.onCancel({ | ||
event: 'cancel' | ||
}); | ||
} | ||
}, | ||
onOk: function onOk() { | ||
@@ -76,15 +84,8 @@ this.setOpenState(false); | ||
}, | ||
onCancel: function onCancel() { | ||
this.setOpenState(false); | ||
if (this.props.onCancel) { | ||
this.props.onCancel({ | ||
event: 'cancel' | ||
}); | ||
} | ||
}, | ||
onSelect: function onSelect(selectNameValue, indexOfScrollers) { | ||
var newVal = [].concat(_toConsumableArray(this.value)); | ||
newVal[indexOfScrollers] = selectNameValue.value; | ||
if (this.props.onChange) { | ||
this.props.onChange(newVal, { changedIndex: indexOfScrollers }); | ||
this.props.onChange(selectNameValue.value, { | ||
indexOfScrollers: indexOfScrollers, | ||
preValue: [].concat(_toConsumableArray(this.value)) | ||
}); | ||
} | ||
@@ -91,0 +92,0 @@ }, |
@@ -70,3 +70,3 @@ 'use strict'; | ||
} else { | ||
// refresh 和 scrollTo 等方法都会再次触发 scrollEnd,此处并不希望此行为 | ||
// refresh 和 scrollTo 等方法都会再次触发 scrollEnd | ||
setTimeout(function () { | ||
@@ -77,5 +77,2 @@ _this.iscroll.refresh(); | ||
} | ||
// const y = this.iscroll.pages[0][this.defaultScrollPosition].y; | ||
// console.log(y); | ||
}, | ||
@@ -89,3 +86,2 @@ componentWillUnmount: function componentWillUnmount() { | ||
// debugger | ||
var index = undefined; | ||
@@ -92,0 +88,0 @@ if (this.props.heightOfItem) { |
{ | ||
"name": "rmc-picker", | ||
"version": "0.2.1", | ||
"version": "0.2.2", | ||
"description": "m-picker ui component for react", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
21252
571