igniteui-react-core
Version:
Ignite UI React Core.
61 lines (60 loc) • 2.42 kB
JavaScript
/*
THIS INFRAGISTICS ULTIMATE SOFTWARE LICENSE AGREEMENT ("AGREEMENT") LOCATED HERE:
https://www.infragistics.com/legal/license/igultimate-la
https://www.infragistics.com/legal/license/igultimate-eula
GOVERNS THE LICENSING, INSTALLATION AND USE OF INFRAGISTICS SOFTWARE. BY DOWNLOADING AND/OR INSTALLING AND USING INFRAGISTICS SOFTWARE: you are indicating that you have read and understand this Agreement, and agree to be legally bound by it on behalf of the yourself and your company.
*/
import { __extends } from "tslib";
import { LocalDataSource } from "./LocalDataSource";
import { DataSourceExecutionContext } from "./DataSourceExecutionContext";
import { markType } from "./type";
/**
* @hidden
*/
var PagedDataSource = /** @class */ /*@__PURE__*/ (function (_super) {
__extends(PagedDataSource, _super);
function PagedDataSource(a) {
var _this = _super.call(this) || this;
_this.ee = null;
_this.ef = false;
_this.actualDataProvider = a;
_this.actualDataProvider.executionContext = new DataSourceExecutionContext();
return _this;
}
PagedDataSource.prototype.isPlaceholderItem = function (a) {
return !this.ef;
};
PagedDataSource.prototype.getItemPropertyAtIndex = function (a, b) {
if (this.ee.isVirtual) {
if (this.getRowType(a) != 0) {
return _super.prototype.getItemPropertyAtIndex.call(this, a, b);
}
else {
var c = this.getItemAtIndex(a);
if (c == null) {
return null;
}
return this.getItemProperty(c, b);
}
}
return _super.prototype.getItemPropertyAtIndex.call(this, a, b);
};
PagedDataSource.prototype.getItemProperty = function (a, b) {
if (a == null) {
return null;
}
if (this.ee.isVirtual) {
return this.ee.getItemProperty(a, b);
}
return _super.prototype.getItemProperty.call(this, a, b);
};
PagedDataSource.prototype.setSchema = function (a) {
if (this.actualBaseDataProvider != null) {
this.actualBaseDataProvider.setSchema(a);
this.queueAutoRefresh();
}
};
PagedDataSource.$t = markType(PagedDataSource, 'PagedDataSource', LocalDataSource.$);
return PagedDataSource;
}(LocalDataSource));
export { PagedDataSource };