UNPKG

@darwino/darwino

Version:

A set of Javascript classes and utilities

55 lines (41 loc) 865 B
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty"; /* * (c) Copyright Darwino Inc. 2014-2017. */ export default class JSArrayDataFetcher { constructor(props) { _defineProperty(this, "_array", []); this._array = props.values; } init() {} getArray() { return this._array; } setArray(array) { this._array = array; if (this.onDataLoaded) this.onDataLoaded(0, this.getRowCount()); } isFetching() { return false; } isError() { return false; } getErrorMessage() { return null; } hasMoreRows() { return false; } getRow(i) { return this._array[i]; } getRows(skip, limit) { return this._array.slice(skip, limit); } getRowCount() { return this._array ? this._array.length : 0; } loadMoreRows() {} } //# sourceMappingURL=JSArrayDataFetcher.js.map