update js api
This commit is contained in:
parent
8214e50f79
commit
229fc41de3
@ -247,7 +247,7 @@ public class ListNode extends SuperNode<RecyclerView> implements IDoricScrollabl
|
|||||||
if (params.getProperty("animated").isBoolean()) {
|
if (params.getProperty("animated").isBoolean()) {
|
||||||
animated = params.getProperty("animated").asBoolean().value();
|
animated = params.getProperty("animated").asBoolean().value();
|
||||||
}
|
}
|
||||||
JSNumber pos = params.getProperty("pos").asNumber();
|
JSNumber pos = params.getProperty("index").asNumber();
|
||||||
moveToPosition(pos.toInt(), animated);
|
moveToPosition(pos.toInt(), animated);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1889,10 +1889,10 @@ var List = /** @class */ (function (_super) {
|
|||||||
return this.cachedViews.values();
|
return this.cachedViews.values();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
List.prototype.scrollToItem = function (context, pos, config) {
|
List.prototype.scrollToItem = function (context, index, config) {
|
||||||
var _a;
|
var _a;
|
||||||
var animated = (_a = config) === null || _a === void 0 ? void 0 : _a.animated;
|
var animated = (_a = config) === null || _a === void 0 ? void 0 : _a.animated;
|
||||||
return this.nativeChannel(context, 'scrollToItem')({ pos: pos, animated: animated });
|
return this.nativeChannel(context, 'scrollToItem')({ index: index, animated: animated, });
|
||||||
};
|
};
|
||||||
List.prototype.reset = function () {
|
List.prototype.reset = function () {
|
||||||
this.cachedViews.clear();
|
this.cachedViews.clear();
|
||||||
|
@ -1395,10 +1395,10 @@ class List extends Superview {
|
|||||||
return this.cachedViews.values();
|
return this.cachedViews.values();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
scrollToItem(context, pos, config) {
|
scrollToItem(context, index, config) {
|
||||||
var _a;
|
var _a;
|
||||||
const animated = (_a = config) === null || _a === void 0 ? void 0 : _a.animated;
|
const animated = (_a = config) === null || _a === void 0 ? void 0 : _a.animated;
|
||||||
return this.nativeChannel(context, 'scrollToItem')({ pos, animated });
|
return this.nativeChannel(context, 'scrollToItem')({ index, animated, });
|
||||||
}
|
}
|
||||||
reset() {
|
reset() {
|
||||||
this.cachedViews.clear();
|
this.cachedViews.clear();
|
||||||
|
@ -2854,10 +2854,10 @@ class List extends Superview {
|
|||||||
return this.cachedViews.values();
|
return this.cachedViews.values();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
scrollToItem(context, pos, config) {
|
scrollToItem(context, index, config) {
|
||||||
var _a;
|
var _a;
|
||||||
const animated = (_a = config) === null || _a === void 0 ? void 0 : _a.animated;
|
const animated = (_a = config) === null || _a === void 0 ? void 0 : _a.animated;
|
||||||
return this.nativeChannel(context, 'scrollToItem')({ pos, animated });
|
return this.nativeChannel(context, 'scrollToItem')({ index, animated, });
|
||||||
}
|
}
|
||||||
reset() {
|
reset() {
|
||||||
this.cachedViews.clear();
|
this.cachedViews.clear();
|
||||||
|
2
doric-js/index.d.ts
vendored
2
doric-js/index.d.ts
vendored
@ -523,7 +523,7 @@ declare module 'doric/lib/src/widget/list' {
|
|||||||
y: number;
|
y: number;
|
||||||
}) => void;
|
}) => void;
|
||||||
scrolledPosition?: number;
|
scrolledPosition?: number;
|
||||||
scrollToItem(context: BridgeContext, pos: number, config?: {
|
scrollToItem(context: BridgeContext, index: number, config?: {
|
||||||
animated?: boolean;
|
animated?: boolean;
|
||||||
}): Promise<any>;
|
}): Promise<any>;
|
||||||
reset(): void;
|
reset(): void;
|
||||||
|
2
doric-js/lib/src/widget/list.d.ts
vendored
2
doric-js/lib/src/widget/list.d.ts
vendored
@ -26,7 +26,7 @@ export declare class List extends Superview {
|
|||||||
y: number;
|
y: number;
|
||||||
}) => void;
|
}) => void;
|
||||||
scrolledPosition?: number;
|
scrolledPosition?: number;
|
||||||
scrollToItem(context: BridgeContext, pos: number, config?: {
|
scrollToItem(context: BridgeContext, index: number, config?: {
|
||||||
animated?: boolean;
|
animated?: boolean;
|
||||||
}): Promise<any>;
|
}): Promise<any>;
|
||||||
reset(): void;
|
reset(): void;
|
||||||
|
@ -47,10 +47,10 @@ export class List extends Superview {
|
|||||||
return this.cachedViews.values();
|
return this.cachedViews.values();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
scrollToItem(context, pos, config) {
|
scrollToItem(context, index, config) {
|
||||||
var _a;
|
var _a;
|
||||||
const animated = (_a = config) === null || _a === void 0 ? void 0 : _a.animated;
|
const animated = (_a = config) === null || _a === void 0 ? void 0 : _a.animated;
|
||||||
return this.nativeChannel(context, 'scrollToItem')({ pos, animated });
|
return this.nativeChannel(context, 'scrollToItem')({ index, animated, });
|
||||||
}
|
}
|
||||||
reset() {
|
reset() {
|
||||||
this.cachedViews.clear();
|
this.cachedViews.clear();
|
||||||
|
@ -67,9 +67,9 @@ export class List extends Superview {
|
|||||||
@Property
|
@Property
|
||||||
scrolledPosition?: number
|
scrolledPosition?: number
|
||||||
|
|
||||||
scrollToItem(context: BridgeContext, pos: number, config?: { animated?: boolean }) {
|
scrollToItem(context: BridgeContext, index: number, config?: { animated?: boolean, }) {
|
||||||
const animated = config?.animated
|
const animated = config?.animated
|
||||||
return this.nativeChannel(context, 'scrollToItem')({ pos, animated }) as Promise<any>
|
return this.nativeChannel(context, 'scrollToItem')({ index, animated, }) as Promise<any>
|
||||||
}
|
}
|
||||||
|
|
||||||
reset() {
|
reset() {
|
||||||
|
4
doric-web/dist/index.js
vendored
4
doric-web/dist/index.js
vendored
@ -2912,10 +2912,10 @@ class List extends Superview {
|
|||||||
return this.cachedViews.values();
|
return this.cachedViews.values();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
scrollToItem(context, pos, config) {
|
scrollToItem(context, index, config) {
|
||||||
var _a;
|
var _a;
|
||||||
const animated = (_a = config) === null || _a === void 0 ? void 0 : _a.animated;
|
const animated = (_a = config) === null || _a === void 0 ? void 0 : _a.animated;
|
||||||
return this.nativeChannel(context, 'scrollToItem')({ pos, animated });
|
return this.nativeChannel(context, 'scrollToItem')({ index, animated, });
|
||||||
}
|
}
|
||||||
reset() {
|
reset() {
|
||||||
this.cachedViews.clear();
|
this.cachedViews.clear();
|
||||||
|
Reference in New Issue
Block a user