fix(check-all): fix column collection
This commit is contained in:
parent
3dd134cb21
commit
9935efe966
@ -1,4 +1,4 @@
|
|||||||
const DEBUG_MODE = /localhost/.test(window.location.href) ? 1 : 0;
|
const DEBUG_MODE = /localhost/.test(window.location.href) ? 0 : 0;
|
||||||
|
|
||||||
import * as defer from 'lodash.defer';
|
import * as defer from 'lodash.defer';
|
||||||
|
|
||||||
|
|||||||
@ -1,3 +1,5 @@
|
|||||||
|
const DEBUG_MODE = /localhost/.test(window.location.href) ? 0 : 0;
|
||||||
|
|
||||||
import { Utility } from '../../core/utility';
|
import { Utility } from '../../core/utility';
|
||||||
import { TableIndices } from '../../lib/table/table';
|
import { TableIndices } from '../../lib/table/table';
|
||||||
|
|
||||||
@ -30,6 +32,10 @@ export class CheckAll {
|
|||||||
this._tableIndices = new TableIndices(this._element);
|
this._tableIndices = new TableIndices(this._element);
|
||||||
|
|
||||||
this._gatherColumns();
|
this._gatherColumns();
|
||||||
|
|
||||||
|
if (DEBUG_MODE > 0)
|
||||||
|
console.log(this._columns);
|
||||||
|
|
||||||
this._findCheckboxColumns().forEach(columnId => this._checkAllColumns.push(new CheckAllColumn(this._element, app, this._columns[columnId])));
|
this._findCheckboxColumns().forEach(columnId => this._checkAllColumns.push(new CheckAllColumn(this._element, app, this._columns[columnId])));
|
||||||
|
|
||||||
// mark initialized
|
// mark initialized
|
||||||
@ -37,8 +43,11 @@ export class CheckAll {
|
|||||||
}
|
}
|
||||||
|
|
||||||
_gatherColumns() {
|
_gatherColumns() {
|
||||||
for (const rowIndex of new Array(this._tableIndices.maxRow + 1)) {
|
for (const rowIndex of Array(this._tableIndices.maxRow + 1).keys()) {
|
||||||
for (const colIndex of new Array(this._tableIndices.maxCol + 1)) {
|
for (const colIndex of Array(this._tableIndices.maxCol + 1).keys()) {
|
||||||
|
if (DEBUG_MODE > 1)
|
||||||
|
console.log(rowIndex, colIndex);
|
||||||
|
|
||||||
const cell = this._tableIndices.getCell(rowIndex, colIndex);
|
const cell = this._tableIndices.getCell(rowIndex, colIndex);
|
||||||
|
|
||||||
if (!cell)
|
if (!cell)
|
||||||
|
|||||||
Reference in New Issue
Block a user