vitalets / angular-xeditable

Edit in place for AngularJS
http://vitalets.github.io/angular-xeditable
MIT License
1.91k stars 403 forks source link

Editable row: breakage when form is embedded within a form #542

Closed tallsam closed 8 years ago

tallsam commented 8 years ago

When embedding the editable row table/form within another form the edit buttons no longer work.

http://jsfiddle.net/tallsam/cjwt6jhr/

Remove the wrapper form and it works correctly.

ckosloski commented 8 years ago

Looking at the code, if the element is wrapped by a form (not editable-form), it assumes it's a single editable element and ignores the e-form attribute. Why do you need to have an editable-form wrapped by a form?

tallsam commented 8 years ago

I'm working on a complex reusable form component that is included within another form via a directive. So the component has no knowledge of the other form. In some circumstances the other form may not exist.

-form
  - name
  - size
  - historical-stock
     - year, volume
     - year, volume

If you consider the above, the stock form is a parent form, and the historical stock area would be the table with the editable rows. historical stock is embedded within the stock form using a directive.

tallsam commented 8 years ago

I see what you mean about not needing to use editable form - I think I'll switch to using editable popover in this case.

Feel free to close.

ckosloski commented 8 years ago

OK, glad I could help. You need to close the issue.

tallsam commented 8 years ago

Okay thanks a lot.