[v10.0.x] Datagrid: Remove multi-paste (#67730)

Datagrid: Remove multi-paste (#67387)

remove multi-paste functionality and unneccessary async from func

(cherry picked from commit 3a6f162cc6)

Co-authored-by: Victor Marin <36818606+mdvictor@users.noreply.github.com>
This commit is contained in:
Grot (@grafanabot)
2023-05-03 09:39:34 -04:00
committed by GitHub
parent 1894440368
commit 8905356e8a
@@ -76,7 +76,7 @@ export function DataGridPanel({ options, data, id, fieldConfig, width, height }:
return getGridCellKind(field, row, hasGridSelection(gridSelection));
};
const onCellEdited = async (cell: Item, newValue: EditableGridCell) => {
const onCellEdited = (cell: Item, newValue: EditableGridCell) => {
// if there are rows selected, return early, we don't want to edit any cell
if (hasGridSelection(gridSelection)) {
return;
@@ -263,7 +263,6 @@ export function DataGridPanel({ options, data, id, fieldConfig, width, height }:
getCellsForSelection={isDatagridEnabled() ? true : undefined}
showSearch={isDatagridEnabled() ? toggleSearch : false}
onSearchClose={onSearchClose}
onPaste={isDatagridEnabled() ? true : undefined}
gridSelection={gridSelection}
onGridSelectionChange={isDatagridEnabled() ? onGridSelectionChange : undefined}
onRowAppended={isDatagridEnabled() ? addNewRow : undefined}