The -Component offers multiple events for cli
You could basically listen to the "sortChanged" event, that ag-grid provides when you click on the default header.