private setTotalRows()

in src/tableView.ts [194:212]


        private setTotalRows(): void {
            let count: number = this._data.length,
                rows: number = Math.min(this.options.rows, count),
                columns: number = Math.min(this.options.columns, count);

            if ((columns > 0) && (rows > 0)) {
                this._totalColumns = columns;
                this._totalRows = rows;
            } else if (rows > 0) {
                this._totalRows = rows;
                this._totalColumns = Math.ceil(count / rows);
            } else if (columns > 0) {
                this._totalColumns = columns;
                this._totalRows = Math.ceil(count / columns);
            } else {
                this._totalColumns = TableView.defaultColumns;
                this._totalRows = Math.ceil(count / TableView.defaultColumns);
            }
        }