How to use @hpcc-js/dgrid-shim - 5 common examples

To help you get started, we’ve selected a few @hpcc-js/dgrid-shim examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github hpcc-systems / Visualization / packages / dgrid / src / DBStore.ts View on Github external
fetchRange(opts: { start: number, end: number }): Promise {
        const data = this._fetchRange(opts);
        const retVal: any = new Deferred();
        retVal.totalLength = new Deferred();
        retVal.resolve(data);
        retVal.totalLength.resolve(this._db.length() - 1);
        return retVal;
    }
github hpcc-systems / Visualization / packages / dgrid / src / DBStore.ts View on Github external
fetchRange(opts: { start: number, end: number }): Promise {
        const data = this._fetchRange(opts);
        const retVal: any = new Deferred();
        retVal.totalLength = new Deferred();
        retVal.resolve(data);
        retVal.totalLength.resolve(this._db.length() - 1);
        return retVal;
    }
github hpcc-systems / Visualization / packages / dgrid / src / DatasourceStore.ts View on Github external
fetchRange(options): Promise {
        const retVal = new Deferred();
        this._request(options.start, options.end).then(response => retVal.resolve(response));
        return new QueryResults(retVal.then(response => response.data), {
            totalLength: retVal.then(response => response.totalLength)
        });
    }
}
github hpcc-systems / Visualization / packages / dgrid / src / DatasourceTable.ts View on Github external
return super.render(w => {
            if (this._prevDatasource !== this.datasource()) {
                this._dgrid.set("collection", new Memory());
                this._dgrid.set("columns", []);
                this._prevDatasource = this.datasource();
                if (this._prevDatasource) {
                    const store = new DatasourceStore(this._prevDatasource);
                    this._dgrid.set("columns", store.columns());
                    this._dgrid.set("collection", store);
                    if (callback) {
                        callback(w);
                    }
                } else {
                    if (callback) {
                        callback(w);
                    }
                }
            } else {
                if (callback) {
github hpcc-systems / Visualization / packages / dgrid / src / DatasourceStore.ts View on Github external
fetchRange(options): Promise {
        const retVal = new Deferred();
        this._request(options.start, options.end).then(response => retVal.resolve(response));
        return new QueryResults(retVal.then(response => response.data), {
            totalLength: retVal.then(response => response.totalLength)
        });
    }
}

@hpcc-js/dgrid-shim

dgrid shim

Apache-2.0
Latest version published 12 days ago

Package Health Score

78 / 100
Full package analysis