Provide access to item index in the callback function