1

In Ag-grid you can navigate with the keyboard. When you use grouping you can press enter to expand the current node.

Is there a way to stop this when the node is a leaf?

GroupCellRenderer.prototype.onKeyDown = function (event) {
        var enterKeyPressed = isKeyPressed(event, KeyCode.ENTER);
        if (!enterKeyPressed || this.params.suppressEnterExpand) {
            return;
        }
        var cellEditable = this.params.column && this.params.column.isCellEditable(this.params.node);
        if (cellEditable) {
            return;
        }
        this.onExpandOrContract();
};

This is the code that checks if the node should be expanded. So I would need suppressEnterExpand to be a function so I can give it some context on the current node. Or it should not try to call the expand when it's on a leaf.

dewil_de
  • 535
  • 4
  • 11

0 Answers0