I referred below link to implement collapsed group row in initial renderer.
Since I was getting requests for async data, I changed it to the code below.
Also, when selecting the second row among the grouped rows, captionTemplate of group options were used to move to the corresponding page.
the whole code:
However, inside the library it is calling these errors.