@platform/ui.datagrid
Version:
Isolated tabular DataGrid.
16 lines (15 loc) • 500 B
JavaScript
import { BindingMonitor } from './BindingMonitor';
export function init(args) {
const { grid } = args;
const fire = (command, e, props = {}) => {
grid.command({ command, props, cancel: () => e.cancel() });
};
const bindings = new BindingMonitor({ grid });
const monitor = (command) => bindings.monitor(command, (e) => fire(command, e));
monitor('CUT');
monitor('COPY');
monitor('PASTE');
monitor('BOLD');
monitor('ITALIC');
monitor('UNDERLINE');
}