private getComputedOptions()

in src/tableView.ts [315:342]


        private getComputedOptions(data: any[], orientation: string): TableViewComputedOptions {
            let rows: number,
                columns: number = 0;

            rows = data
                ? data.length
                : 0;

            for (let i: number = 0; i < rows; i++) {
                let currentRow: any[] = data[i];

                if (currentRow && currentRow.length > columns) {
                    columns = currentRow.length;
                }
            }

            if (orientation === Orientation.HORIZONTAL) {
                return {
                    columns: columns,
                    rows: rows
                };
            } else {
                return {
                    columns: rows,
                    rows: columns
                };
            }
        }