Search code examples
javascriptangularangular-materialthingsboardangular-material-table

How to access MatTableDataSource in custom Thingsboard widget?


I have developed a few custom Thingsboard widgets. It seems that I am able to access much of @angular/material from within my widget code. I am utilizing mat-table successfully, but in order to easily support pagination/filtering/sorting etc. I would like to utilize the MatTableDataSource class - this is resulting in an error as this class is apparently not exposed. How can I access MatTableDataSource from within my custom widget code?


Solution

  • As for 3.3.4.1 version you can't import so can't use such classes in JS section of custom widget. I just grep the source code and found nothing about MatTableDataSource. There is similar question in the official bugtracker and there is no suggestion as well (16/06/2022).