Hi,
i have created custom controller class like SalesController, in this class i have coded event listner for child table field change:
my_custom_app.my_custom_app.MyController = frappe.ui.form.Controller.extend({
my_field: function (doc, cdt, cdn) {
console.log("is triggered");
},
});
This is triggered twice.
I tried also set event listener in setup:
my_custom_app.my_custom_app.MyController = frappe.ui.form.Controller.extend({
setup: function () {
frappe.ui.form.on("My Child Doctype", "my_field", $.proxy(function(frm, cdt, cdn) {
console.log("is triggered");
}, this));
},
});
This is triggered 4 times.
Event is triggered properly in both versions of code, but is triggered multiple times.
What Am I doing wrong? THANKS