on

allows attaching custom handlers to inner events of the component

object on;

Example

webix.ui({
    view:"query", 
    on:{
        onChange: function(){ 
            const filter = this.getFilterFunction();
            $$("table").filter(filter);
        }
    }
});

Related samples

Details

All keys defined in the object will be processed as the names of events, and their values as the related handlers.

The property can be used as an alternative to the attachEvent method. But mind that the on property defines a handler BEFORE view creation, while the attachEvent method defines an event handler AFTER view creation. For example, the onAfterRender handler should be attached via the on property if you want to catch the view first rendering.

See also
Back to top