Jam.py documentation

on_after_scroll

on_after_scroll(item)

domain: client

language: javascript

class Item class

Description

Occurs after an application scrolls from one record to another.

The item parameter is an item that triggered the event.

Write an on_after_scroll event handler to take specific action immediately after an application scrolls to another record as a result of a call to the first, last, next, prior, and locate methods. on_after_scroll is called after all other events triggered by these methods and any other methods that switch from record to record in the item dataset.

Example

The following code is used in the Demo project to asynchronously open invoice_table detail dataset after the Invoice journal record has changed:

var ScrollTimeOut;

function on_after_scroll(item) {
    clearTimeout(ScrollTimeOut);
    ScrollTimeOut = setTimeout(
        function() {
            item.invoice_table.open(function() {});
        },
        100
    );
}