Search code examples
angularhtmltypescriptprimengprimeng-turbotable

PrimeNG Turbotable all expand


I'm using primeng turbotable but unable to expand all the raws by default.

https://stackblitz.com/edit/angular-qccqg8

Already tried with below example but seems not working.

PrimeNG Turbotable expand by default


Solution

  • Replace Your code inside foreach loop like this, it will expand all rows by default.

     this.cars.forEach(function(car) {
         thisRef.expandedRows[car.vin] = true;
     });