diff --git a/angular-xeditable/angular-xeditable.d.ts b/angular-xeditable/angular-xeditable.d.ts index eaa1296886..026fc5d2fb 100644 --- a/angular-xeditable/angular-xeditable.d.ts +++ b/angular-xeditable/angular-xeditable.d.ts @@ -53,4 +53,46 @@ declare namespace angular.xeditable { */ activationEvent: string; } + + interface IEditableFormController extends angular.IFormController { + + /** + * Shows form with editable controls. + */ + $show(): void; + + /** + * Hides form with editable controls without saving. + */ + $hide(): void; + + /** + * Sets focus on form field specified by `name`.
+ * When trying to set the focus on a form field of a new row in the editable table, the `$activate` call needs to be wrapped in a `$timeout` call so that the form is rendered before the `$activate` function is called. + * + * @param name name of field + */ + $activate(name: string): void; + + /** + * Triggers `oncancel` event and calls `$hide()`. + */ + $cancel(): void; + + $setWaiting(value: boolean): void; + + /** + * Shows error message for particular field. + * + * @param name name of field + * @param msg error message + */ + $setError(name: string, msg: string): void; + + $submit(): void; + + $save(): void; + + } + }