extract get view index into data source view method

Reviewed By: ivanmisuno

Differential Revision: D46224361

fbshipit-source-id: 193becb59eee469ba3e68611e588671947406f7e
This commit is contained in:
Anton Kastritskiy
2023-05-26 11:55:11 -07:00
committed by Facebook GitHub Bot
parent 27909e8296
commit 6c84732742

View File

@@ -584,6 +584,10 @@ export class DataSourceView<T, KeyType> {
}
}
getViewIndex(entry: T): number {
return this.output(0, Infinity).indexOf(entry);
}
public setWindow(start: number, end: number) {
this.windowStart = start;
this.windowEnd = end;