event callback argument is empty

270 views Asked by At

I've got event listeners defined as <AgGridReact> properties and then also just added this to my onGridReady callback:

grid.api.addEventListener('sortChanged',
    evt => {
      console.log(evt);
      debugger;
    });

Either way, the evt object is empty (an empty object, not undefined). Is this expected behavior or am I doing something wrong? The documentation (https://www.ag-grid.com/javascript-grid-events/) doesn't say anything about what to expect.

1

There are 1 answers

0
Sean Landsman On BEST ANSWER

What you have is fine, but all 3 of the "sort" events:

sortChanged
beforeSortChanged
afterSortChanged

are notification only events - no event object are passed into the event itself