1
votes

[Violation] Added non-passive event listener to a scroll-blocking 'touchstart' event. Consider marking event handler as 'passive' to make the page more responsive

i am trying to use Tabulator in angular with success.but after a while the grid stop responding and then the browser, i am updating the grid content every 1 min using observable. aftr 4 times everything stucks with this issue....

//define table options
this.flatTableOptions = {
    reactiveData: true,
    data: this.currentTrafficServices,
    columns: [
        {
            title: 'SERVICES',
            field: 'displayName'
        },
        {
            title: 'OCCURRENCES',
            field: 'connectionQuantity'
        },
        {
            title: 'STARTING FROM',
            field: 'firstSeen',
            mutator: this.milliToDate
        },
        {
            title: 'LAST UPDATE',
            field: 'lastSeen',
            mutator: this.milliToDate
        }
    ],
    // persistentSort: true,
    selectable: true,
    layout: "fitColumns"
};

//create table
this.flatTable = new Tabulator('#tabulator-flat', this.flatTableOptions);

this.flatTable.redraw(true);

Does anybody know how to fix this? or should I give up on Tabulator with Angular?

1
Have you tried following the advice in the error message? - Robert Harvey
You might also try searching for the error message, as there are a number of questions about it here on Stack Overflow, and indeed on Angular's GitHub. - Heretic Monkey
@RobertHarvey yes i tried . not working. the issue is coming from the Tabulator.js (3rd party) code so changing their code not seems to be a good idea. but even after i changed it the issue occurs multiple times until the browser stop responding... - Shaul Naim
if anyone sees it... this helped me github.com/zzarcon/default-passive-events - Shaul Naim

1 Answers

0
votes

That was a console warning rather than an error, it would have had no affect on your tables function, as @Shual mentions it is more to do with performance optimisation than functionality.

As of version v4.4 this behaviour has been optimised an you will no longer see these warnings in your console