packages/perspective-viewer-hypergrid/src/js/PerspectiveDataModel.js
async function(row, col, event) {
        if (this.isTreeCol(col)) {
            let isShift = false;
            if (event.primitiveEvent.detail.primitiveEvent) {
                isShift = !!event.primitiveEvent.detail.primitiveEvent.shiftKey; // typecast to boolean
            }
            let is_expanded = await this._view.get_row_expanded(row);
            if (isShift) {
                if (is_expanded) {
                    if (this.data[row][col].rowPath.length === 1) {
                        this._view.collapse(row);
                    } else {
                        this._view.set_depth(this.data[row][col].rowPath.length - 2);
                    }
                } else {
                    this._view.set_depth(this.data[row][col].rowPath.length - 1);
                }
            } else {
                if (is_expanded) {
                    this._view.collapse(row);
                } else {
                    this._view.expand(row);
                }
            }
            let nrows = await this._view.num_rows();
            this.setDirty(nrows);
            this.grid.canvas.paintNow();
        }
    }
async function(row, col, event) {
        if (this.isTreeCol(col)) {
            let isShift = false;
            if (event.primitiveEvent.detail.primitiveEvent) {
                isShift = !!event.primitiveEvent.detail.primitiveEvent.shiftKey; // typecast to boolean
            }
            let is_expanded = await this._view.get_row_expanded(row);
            if (isShift) {
                if (is_expanded) {
                    if (this.data[row][col].rowPath.length === 1) {
                        this._view.collapse(row);
                    } else {
                        this._view.set_depth(this.data[row][col].rowPath.length - 2);
                    }
                } else {
                    this._view.set_depth(this.data[row][col].rowPath.length - 1);
                }
            } else {
                if (is_expanded) {
                    this._view.collapse(row);
                } else {
                    this._view.expand(row);
                }
            }
            let nrows = await this._view.num_rows();
            this.setDirty(nrows);
            this.grid.canvas.paintNow();
        }
    }
async function ( row , col , event ) { if ( this . isTreeCol ( col ) ) { let isShift = false ; if ( event . primitiveEvent . detail . primitiveEvent ) { isShift = ! ! event . primitiveEvent . detail . primitiveEvent . shiftKey ; // typecast to boolean } let is_expanded = await this . _view . get_row_expanded ( row ) ; if ( isShift ) { if ( is_expanded ) { if ( this . data [ row ] [ col ] . rowPath . length === 1 ) { this . _view . collapse ( row ) ; } else { this . _view . set_depth ( this . data [ row ] [ col ] . rowPath . length - 2 ) ; } } else { this . _view . set_depth ( this . data [ row ] [ col ] . rowPath . length - 1 ) ; } } else { if ( is_expanded ) { this . _view . collapse ( row ) ; } else { this . _view . expand ( row ) ; } } let nrows = await this . _view . num_rows ( ) ; this . setDirty ( nrows ) ; this . grid . canvas . paintNow ( ) ; } }
Called when clicking on a row group expand
Called when clicking on a row group expand