onChange

fires when any change occurs

void onChange( [any config] );
configanysource of change

Example

{ view:"datatable", id:"dtable", data:grid_data },
{
  view:"filter",
  data:grid_data,
  field:"year", // a data field with numbers
  on:{
    onChange: function(config){
      const filter = this.getFilterFunction();
      $$("dtable").filter(obj => filter(obj));
    }
  }
}

Related samples

Details

The config parameter can have the following values:

  • "user" - if the change was made by user
  • "auto" - if the change was made by the library inner logic
  • undefined - if the change was made by a control's setValue or Form setValues method call made by a programmer.

Also, you can get a custom value as the config parameter. To do that call the setValue/setValues method passing your value as the last argument:

webix.ui({
  view:"filter",
  // ..config
  on:{
    onChange: function(config){
        // config is {yourProperty: "yourValue"}
    }
  }
});
 
// onChange event will receive object as the last parameter
$$("$filter1").setValue(newValue, {yourProperty: "yourValue"});
See also
  • API
  • Articles
  • Back to top