Skip to main content

focusChange

fires on moving focus to a new item

focusChange: (focusIndex?: number, id?: string | number) => void;

Parameters:

The callback of the focusChange event is called with the following parameters:

  • focusIndex - (optional) the position of an item
  • id - (optional) the id of an item

Example

list.events.on("focusChange", function(focusIndex, id){
// your code here
});

Related sample: List. Events

Change log:

  • Parameters of the callback function became optional in v8.3.14