devexpress-reporting
Version:
DevExpress Reporting provides the capability to develop a reporting application to create and customize reports.
24 lines (23 loc) • 949 B
JavaScript
/**
* DevExpress HTML/JS Reporting (designer\widgets\dataSourceSelectBox.js)
* Version: 25.1.3
* Build date: Jun 26, 2025
* Copyright (c) 2012 - 2025 Developer Express Inc. ALL RIGHTS RESERVED
* License: https://www.devexpress.com/Support/EULAs/universal.xml
*/
import { Editor } from '@devexpress/analytics-core/analytics-widgets';
import ArrayStore from 'devextreme/data/array_store';
import DataSource from 'devextreme/data/data_source';
import * as ko from 'knockout';
export class DataSourceSelectBox extends Editor {
static createDataSource(values) {
const store = new ArrayStore(values);
const options = { store: store, pageSize: 20, paginate: true };
return new DataSource(options);
}
getValues() {
if (!this.dataSource)
this._disposables.push(this.dataSource = ko.computed(() => DataSourceSelectBox.createDataSource(this._get('values'))));
return this.dataSource;
}
}