UNPKG

devexpress-reporting

Version:

DevExpress Reporting provides the capability to develop a reporting application to create and customize reports.

30 lines (29 loc) 991 B
/** * DevExpress HTML/JS Reporting (designer\widgets\undoEditors.js) * Version: 24.2.6 * Build date: Mar 18, 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 * as ko from 'knockout'; export class ComboboxUndoEditor extends Editor { constructor(info, level, parentDisabled, textToSearch) { super(info, level, parentDisabled, textToSearch); } generateValue(undoEngine) { if (!this.undoValue) { this._disposables.push(this.undoValue = ko.computed({ read: () => { return this.value(); }, write: (val) => { undoEngine().start(); this.value(val); undoEngine().end(); } })); } return this.undoValue; } }