Adds an event handler that runs when the current index changes.
The onCurrentIndexChanged() function allows you to optionally perform actions
right after the current index changes.
Calling onCurrentIndexChanged() on a write-only dataset causes an error.
handler(index: number): void The current index change event handler.