Detecting user-initiated sort in the onAfterSort event

I’m trying to run an action after the user sorts a column in my datatable. Unfortunately, onAfterSort seems to run after every render, so I can’t discern if it’s user-initiated or the result of data being refreshed. Is there a flag set anywhere (i.e., an argument passed to the function) that could help me figure out the source of the event?

You can use the onHeaderClick event to track user’s click instead:

http://webix.com/snippet/b8e5598b