onChange

fires when the user changes the value of the DataValue object

void onChange();

Example

var data = new webix.DataValue({});
data.setValue("Anna");
 
$$("myForm").bind(data);
// ...
 
data.attachEvent("onChange", function(obj, config){
    alert("Your new name is: "+ obj.name);
});

Details

The function executed on this event, takes 2 arguments:

  • data - data object
  • config - source of the change. Can have the following values:
    • "user" - if the change is made by user
    • "auto" - if the change is made by the library.
Back to top