The onStateChange option can be used to optionally listen to state changes within the table. API Docs Guide
onStateChange