angular-xeditable icon indicating copy to clipboard operation
angular-xeditable copied to clipboard

onaftersave & onbeforesave not being triggered

Open Kreshnik opened this issue 9 years ago • 4 comments

I am having an issue with x-editable, none of the above mentioned events are being triggered after save.

Here are some info that might help solve the issue;

  1. I am using the version 0.1.8 of x-editable, also tested it with version 0.1.9
  2. I am using AngularJS version 1.4.8
  3. The project uses ui-router version 0.2.15
  4. Here is the line of code, which uses x-editable <span><a ui-sref="qa-area({qaId: tree.tree_id})" editable-text="tree.tree_name" e-form="treeForm" onaftersave="qa.updateTreeTitle(tree)"> {{tree.tree_name}} </a></span>

Please let me know, if I can provide more information to this issue.

Kreshnik avatar Jan 05 '16 18:01 Kreshnik

Just found out that the issue has to do with the method controller. editable-text="tree.tree_name" the tree model in this case belongs to another controller, while onaftersave="qa.updateTreeTitle(tree)" calls a method in another controller. And this seems not to work somehow.

Kreshnik avatar Jan 05 '16 19:01 Kreshnik

Can you provide a jsfiddle or plunker showing your issue?

ckosloski avatar Aug 15 '16 15:08 ckosloski

i have similar problem, and fix is, you need to set submit button inside editable-form <form></form>

bokrizan avatar Aug 31 '16 13:08 bokrizan

@Kreshnik are you still having an issue?

ckosloski avatar Aug 16 '17 15:08 ckosloski