feat:List add scrollToItem method
This commit is contained in:
@@ -1889,6 +1889,9 @@ var List = /** @class */ (function (_super) {
|
||||
return this.cachedViews.values();
|
||||
}
|
||||
};
|
||||
List.prototype.scrollToItem = function (context, pos, animated) {
|
||||
return this.nativeChannel(context, 'scrollToItem')({ pos: pos, animated: animated });
|
||||
};
|
||||
List.prototype.reset = function () {
|
||||
this.cachedViews.clear();
|
||||
this.itemCount = 0;
|
||||
@@ -1953,6 +1956,10 @@ var List = /** @class */ (function (_super) {
|
||||
Property,
|
||||
__metadata$5("design:type", Function)
|
||||
], List.prototype, "onScrollEnd", void 0);
|
||||
__decorate$5([
|
||||
Property,
|
||||
__metadata$5("design:type", Number)
|
||||
], List.prototype, "scrolledPosition", void 0);
|
||||
return List;
|
||||
}(Superview));
|
||||
function list(config) {
|
||||
|
@@ -1395,6 +1395,9 @@ class List extends Superview {
|
||||
return this.cachedViews.values();
|
||||
}
|
||||
}
|
||||
scrollToItem(context, pos, animated) {
|
||||
return this.nativeChannel(context, 'scrollToItem')({ pos, animated });
|
||||
}
|
||||
reset() {
|
||||
this.cachedViews.clear();
|
||||
this.itemCount = 0;
|
||||
@@ -1459,6 +1462,10 @@ __decorate$5([
|
||||
Property,
|
||||
__metadata$5("design:type", Function)
|
||||
], List.prototype, "onScrollEnd", void 0);
|
||||
__decorate$5([
|
||||
Property,
|
||||
__metadata$5("design:type", Number)
|
||||
], List.prototype, "scrolledPosition", void 0);
|
||||
function list(config) {
|
||||
const ret = new List;
|
||||
for (let key in config) {
|
||||
|
@@ -2854,6 +2854,9 @@ class List extends Superview {
|
||||
return this.cachedViews.values();
|
||||
}
|
||||
}
|
||||
scrollToItem(context, pos, animated) {
|
||||
return this.nativeChannel(context, 'scrollToItem')({ pos, animated });
|
||||
}
|
||||
reset() {
|
||||
this.cachedViews.clear();
|
||||
this.itemCount = 0;
|
||||
@@ -2918,6 +2921,10 @@ __decorate$5([
|
||||
Property,
|
||||
__metadata$5("design:type", Function)
|
||||
], List.prototype, "onScrollEnd", void 0);
|
||||
__decorate$5([
|
||||
Property,
|
||||
__metadata$5("design:type", Number)
|
||||
], List.prototype, "scrolledPosition", void 0);
|
||||
function list(config) {
|
||||
const ret = new List;
|
||||
for (let key in config) {
|
||||
|
Reference in New Issue
Block a user