@@ -165,11 +165,10 @@ export default class Gantt {
165
165
// cache index
166
166
task . _index = i ;
167
167
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
+ }
173
172
174
173
// if hours is not set, assume the last day is full day
175
174
// e.g: 2018-09-09 becomes 2018-09-09 23:59:59
@@ -205,6 +204,7 @@ export default class Gantt {
205
204
return task ;
206
205
} )
207
206
. filter ( ( t ) => t ) ;
207
+
208
208
this . groups = this . tasks ;
209
209
if ( this . options ?. enable_grouping ) {
210
210
if ( this . options ?. groups ) {
@@ -213,7 +213,6 @@ export default class Gantt {
213
213
this . groups = [ ...new Set ( this . tasks . map ( ( t ) => t . group ) ) ] ;
214
214
}
215
215
}
216
- console . log ( this . groups ) ;
217
216
218
217
this . setup_dependencies ( ) ;
219
218
}
@@ -415,7 +414,7 @@ export default class Gantt {
415
414
this . config . header_height +
416
415
this . options . padding +
417
416
( this . options . bar_height + this . options . padding ) *
418
- this . groups . length ,
417
+ this . groups . length -
419
418
10 ,
420
419
this . options . container_height !== 'auto'
421
420
? this . options . container_height
0 commit comments