mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-29 20:23:59 +00:00
fix
This commit is contained in:
@@ -189,6 +189,7 @@ export default function DataGridCore(props) {
|
|||||||
return {
|
return {
|
||||||
cell: action.cell,
|
cell: action.cell,
|
||||||
text: action.text,
|
text: action.text,
|
||||||
|
selectAll: action.selectAll,
|
||||||
};
|
};
|
||||||
case 'close': {
|
case 'close': {
|
||||||
const [row, col] = currentCell || [];
|
const [row, col] = currentCell || [];
|
||||||
@@ -315,7 +316,7 @@ export default function DataGridCore(props) {
|
|||||||
|
|
||||||
if (isRegularCell(cell) && !_.isEqual(cell, inplaceEditorState.cell) && _.isEqual(cell, currentCell)) {
|
if (isRegularCell(cell) && !_.isEqual(cell, inplaceEditorState.cell) && _.isEqual(cell, currentCell)) {
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
dispatchInsplaceEditor({ type: 'show', cell });
|
dispatchInsplaceEditor({ type: 'show', cell, selectAll: true });
|
||||||
} else if (!_.isEqual(cell, inplaceEditorState.cell)) {
|
} else if (!_.isEqual(cell, inplaceEditorState.cell)) {
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
dispatchInsplaceEditor({ type: 'close' });
|
dispatchInsplaceEditor({ type: 'close' });
|
||||||
@@ -451,6 +452,8 @@ export default function DataGridCore(props) {
|
|||||||
const cell = [rowCountNewIncluded, (currentCell && currentCell[1]) || 0];
|
const cell = [rowCountNewIncluded, (currentCell && currentCell[1]) || 0];
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
setCurrentCell(cell);
|
setCurrentCell(cell);
|
||||||
|
// @ts-ignore
|
||||||
|
setSelectedCells([cell]);
|
||||||
scrollIntoView(cell);
|
scrollIntoView(cell);
|
||||||
}
|
}
|
||||||
// this.saveAndFocus();
|
// this.saveAndFocus();
|
||||||
@@ -472,7 +475,7 @@ export default function DataGridCore(props) {
|
|||||||
|
|
||||||
if (event.keyCode == keycodes.f2) {
|
if (event.keyCode == keycodes.f2) {
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
dispatchInsplaceEditor({ type: 'show', cell: currentCell });
|
dispatchInsplaceEditor({ type: 'show', cell: currentCell, selectAll: true });
|
||||||
}
|
}
|
||||||
|
|
||||||
const moved = handleCursorMove(event);
|
const moved = handleCursorMove(event);
|
||||||
@@ -490,7 +493,7 @@ export default function DataGridCore(props) {
|
|||||||
const newCell = handleCursorMove(event);
|
const newCell = handleCursorMove(event);
|
||||||
if (event.shiftKey && newCell) {
|
if (event.shiftKey && newCell) {
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
setSelectedCells(getCellRange(shiftDragStartCell, newCell));
|
setSelectedCells(getCellRange(shiftDragStartCell || currentCell, newCell));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user