mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-02-22 15:04:07 +01:00
🎨 delete row by keydown
This commit is contained in:
parent
a104c94c5f
commit
ff0973029d
3 changed files with 40 additions and 32 deletions
|
|
@ -1,5 +1,5 @@
|
|||
import {matchHotKey} from "../../util/hotKey";
|
||||
import {selectRow} from "./row";
|
||||
import {deleteRow, selectRow} from "./row";
|
||||
import {cellScrollIntoView, popTextCell, updateCellsValue} from "./cell";
|
||||
import {avContextmenu} from "./action";
|
||||
import {hasClosestByClassName} from "../../util/hasClosest";
|
||||
|
|
@ -132,6 +132,11 @@ export const avKeydown = (event: KeyboardEvent, nodeElement: HTMLElement, protyl
|
|||
selectRow(selectRowElements[0].querySelector(".av__firstcol"), "unselectAll");
|
||||
return true;
|
||||
}
|
||||
if (event.key === "Backspace") {
|
||||
event.preventDefault();
|
||||
deleteRow(nodeElement, protyle);
|
||||
return true;
|
||||
}
|
||||
if (event.key === "Enter") {
|
||||
selectRow(selectRowElements[0].querySelector(".av__firstcol"), "unselectAll");
|
||||
popTextCell(protyle, [selectRowElements[0].querySelector(".av__cell")]);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue