UNPKG

devextreme

Version:

HTML5 JavaScript Component Suite for Responsive Web Development

33 lines (32 loc) 808 B
/** * DevExtreme (esm/__internal/grids/new/grid_core/editing/utils.js) * Version: 25.1.3 * Build date: Wed Jun 25 2025 * * Copyright (c) 2012 - 2025 Developer Express Inc. ALL RIGHTS RESERVED * Read about DevExtreme licensing here: https://js.devexpress.com/Licensing/ */ export const defaultSetFieldValue = function(newData, value) { const { dataField: dataField } = this; if (!dataField) { return } newData[dataField] = value }; export class PendingPromises { constructor() { this.promises = new Set } waitForAll() { return Promise.all([...this.promises]) } add(p) { this.promises.add(p); p.then((() => { this.promises.delete(p) })); return p } }