Search...
onCurrentIndexChanged( )
Adds an event handler that runs when the current index changes.
Description
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.
Syntax
function onCurrentIndexChanged(handler: CurrentIndexChangedHandler): voidhandler: function CurrentIndexChangedHandler(index: number): void
onCurrentIndexChanged Parameters
NAME
TYPE
DESCRIPTION
Returns
This function does not return anything.
Return Type:
void
CurrentIndexChangedHandler Parameters
NAME
TYPE
DESCRIPTION
index
number
The new index.
Returns
This function does not return anything.
Return Type:
void
Was this helpful?
Register a callback to run when the current index changes
Copy Code
1$w("#myDataset").onCurrentIndexChanged( (index) => {2 let newIndex = index; // 33} );