Skip to content

Commit 0e46955

Browse files
committed
fixes errors in pr
1 parent 148860c commit 0e46955

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

src/index.js

+6-7
Original file line numberDiff line numberDiff line change
@@ -165,11 +165,10 @@ export default class Gantt {
165165
// cache index
166166
task._index = i;
167167

168-
// ********** Fix for single row grouping
169-
if (this.options.enable_grouping && typeof task.group === 'number') {
170-
task._index = task.group;
171-
}
172-
// ********** end of fix
168+
// enables singe row grouping
169+
if (this.options.enable_grouping && typeof task.group === 'number') {
170+
task._index = task.group;
171+
}
173172

174173
// if hours is not set, assume the last day is full day
175174
// e.g: 2018-09-09 becomes 2018-09-09 23:59:59
@@ -205,6 +204,7 @@ export default class Gantt {
205204
return task;
206205
})
207206
.filter((t) => t);
207+
208208
this.groups = this.tasks;
209209
if (this.options?.enable_grouping) {
210210
if (this.options?.groups) {
@@ -213,7 +213,6 @@ export default class Gantt {
213213
this.groups = [...new Set(this.tasks.map((t) => t.group))];
214214
}
215215
}
216-
console.log(this.groups);
217216

218217
this.setup_dependencies();
219218
}
@@ -415,7 +414,7 @@ export default class Gantt {
415414
this.config.header_height +
416415
this.options.padding +
417416
(this.options.bar_height + this.options.padding) *
418-
this.groups.length,
417+
this.groups.length -
419418
10,
420419
this.options.container_height !== 'auto'
421420
? this.options.container_height

0 commit comments

Comments
 (0)