update scrollToItem API

This commit is contained in:
pengfei.zhou
2020-04-22 11:31:03 +08:00
committed by osborn
parent bce9350959
commit 8214e50f79
9 changed files with 24 additions and 9 deletions

View File

@@ -1889,7 +1889,9 @@ var List = /** @class */ (function (_super) {
return this.cachedViews.values();
}
};
List.prototype.scrollToItem = function (context, pos, animated) {
List.prototype.scrollToItem = function (context, pos, config) {
var _a;
var animated = (_a = config) === null || _a === void 0 ? void 0 : _a.animated;
return this.nativeChannel(context, 'scrollToItem')({ pos: pos, animated: animated });
};
List.prototype.reset = function () {

View File

@@ -1395,7 +1395,9 @@ class List extends Superview {
return this.cachedViews.values();
}
}
scrollToItem(context, pos, animated) {
scrollToItem(context, pos, config) {
var _a;
const animated = (_a = config) === null || _a === void 0 ? void 0 : _a.animated;
return this.nativeChannel(context, 'scrollToItem')({ pos, animated });
}
reset() {

View File

@@ -2854,7 +2854,9 @@ class List extends Superview {
return this.cachedViews.values();
}
}
scrollToItem(context, pos, animated) {
scrollToItem(context, pos, config) {
var _a;
const animated = (_a = config) === null || _a === void 0 ? void 0 : _a.animated;
return this.nativeChannel(context, 'scrollToItem')({ pos, animated });
}
reset() {