I am using PrimeNG 6.0.2 with Angular 5 and I'm having issues with the Table plugin. I switched to Table because DataTable is deprecated. Now, I can't access filtered values the way I could before.
Let's say I define my table in component via ViewChild:
@ViewChild('myTable') dataTable: Table;
With DataTable, I could just access the _value property which held sorted and filtered data:
dataTable._value[index] = ...;
But now, this property hold just the sorted array, while I have to use the filteredValue property:
dataTable.filteredValue[index] = ...;
My problem with this is that the filteredValue is undefined
before any filtering, has value when the table is filtered and is null
after I remove all filter text. This yields some pretty ugly code.
Is it possible to access the current data, be it sorted, filtered or identical to the starting array? Or do I have to go with this approach?