MCPcopy Create free account
hub / github.com/betsol/angular-input-modified / onChildFormDestroyed

Function onChildFormDestroyed

src/directive/form.js:158–171  ·  view source on GitHub ↗

* Called when one of child forms is removed from DOM. * Updates internal list of modified child forms in order to keep correct state. * * @param {FormController} childFormCtrl

(childFormCtrl)

Source from the content-addressed store, hash-verified

156 * @param {FormController} childFormCtrl
157 */
158 function onChildFormDestroyed (childFormCtrl) {
159
160 var index = formCtrl.modifiedChildForms.indexOf(childFormCtrl);
161
162 if (-1 === index) {
163 return;
164 }
165
166 // Removing form from the list.
167 formCtrl.modifiedChildForms.splice(index, 1);
168
169 updateFormState();
170
171 }
172
173 }
174 };

Callers

nothing calls this directly

Calls 1

updateFormStateFunction · 0.85

Tested by

no test coverage detected