@platform/ui.datagrid
Version:
Isolated tabular DataGrid.
26 lines (25 loc) • 936 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.afterSelectionHandler = void 0;
var tslib_1 = require("tslib");
function afterSelectionHandler(grid) {
var from = { cell: undefined, ranges: [] };
var afterSelection = function (row1, column1, row2, column2, preventScrolling, selectionLayerLevel) {
var to = grid.selection;
grid.fire({
type: 'GRID/selection',
payload: { from: from, to: to, grid: grid },
});
from = (0, tslib_1.__assign)({}, to);
};
var afterDeselect = function () {
var to = grid.selection;
grid.fire({
type: 'GRID/selection',
payload: { from: from, to: to, grid: grid },
});
from = (0, tslib_1.__assign)({}, to);
};
return { afterSelection: afterSelection, afterDeselect: afterDeselect };
}
exports.afterSelectionHandler = afterSelectionHandler;