Closed Tompish closed 6 years ago
For future refences, the error message is recieved when sending a non-string property to gtApplyfilter().
The confusing part was angular2 rather than the GenericTable.
In the html i had an element which looked like this:
<button (click)="applyFilter('1')">Filter</button>
And the function applyFilter():
public applyFilter = function(filter: number){ this.myGenericTable.gtApplyFilter({Id: filter}); }
And when calling the function from the HTML it worked perfectly and no error message.
But when calling it from the typescipt file in the exact same way, i got the error message saying the function expects a number. If i changed it to a number (i.e. no apostrophes this.applyFilter(1)
), i got the error message attached in my first post.
Hi! When the webpage first loads, I want the table to be filtered by default. I try to do this by simply writing
this.myTable.gtApplyFilter({ RandomColumn: 1 });
However, i keep getting this error message:I have tried to apply the filter in all lifecycle hooks except for ngOnDestroy. I can manually filter the code without any problem once the page has loaded, so i know the filter is correct.