Cannot remove rows after CTRL+A keyboard shortcut

Tags: #<Tag:0x00007fbe95bcd288>

If I select everything by mouse, I have the option to remove rows from the context menu. If I do the selection with CTRL+A, I am only able to add columns from the context menu.

Hi @TheForce

in default CTRL + A selects headers as well and they cannot be deleted. To be able to operate with this shortcut only on cells you would need to overwrite the keycode combination.

Here is a working example http://jsfiddle.net/ke7f1Lbj/

1 Like

Thanks!

you’re welcome @TheForce

Just a quick note regarding the example: needs to be changed to

      if (e.keyCode === 65 && keyC === 17) {
        //CTRL + A
        e.preventDefault();
      	e.stopImmediatePropagation();
        hot.selectCell(0, 0, hot.countRows() -1, hot.countCols()-1);
      }

else editing cells won’t work.

1 Like