mirror of
https://github.com/dbeaver/cloudbeaver.git
synced 2026-09-24 16:04:36 +08:00
* dbeaver/dbeaver-vscode#83 refactor: data grid * chore: try to fix build scripts * chore: commit artifacts * chore: update yarn.lock * fix: adjust grid auto-sizing * chore: fix prettier * chore: add documentation about typescript crashes * fix: cell menu * fix: grid inline editor styles * fix: cell menu styles * fix: cell items alignment * fix: data sync * feat: support reactive values in grid * chore: try to fix strange build bug * chore: restore original file name * fix: add specific to inline editor styles * fix: remove delete row shortcut (not working) * chore: enable common cache
26 lines
682 B
TypeScript
26 lines
682 B
TypeScript
/*
|
|
* CloudBeaver - Cloud Database Manager
|
|
* Copyright (C) 2020-2025 DBeaver Corp and others
|
|
*
|
|
* Licensed under the Apache License, Version 2.0.
|
|
* you may not use this file except in compliance with the License.
|
|
*/
|
|
import type { CellMouseEvent } from 'react-data-grid';
|
|
|
|
export function createCellMouseEvent<E extends React.MouseEvent<HTMLDivElement>>(event: E): CellMouseEvent {
|
|
let defaultPrevented = false;
|
|
const cellEvent = {
|
|
...event,
|
|
preventGridDefault() {
|
|
defaultPrevented = true;
|
|
},
|
|
isGridDefaultPrevented() {
|
|
return defaultPrevented;
|
|
},
|
|
};
|
|
|
|
Object.setPrototypeOf(cellEvent, Object.getPrototypeOf(event));
|
|
|
|
return cellEvent;
|
|
}
|