Skip to content
This repository has been archived by the owner on Dec 12, 2021. It is now read-only.

"removeFields" uses closest .fields, which fails without wrapper #326

Closed
vendethiel opened this issue Jun 24, 2014 · 3 comments
Closed

"removeFields" uses closest .fields, which fails without wrapper #326

vendethiel opened this issue Jun 24, 2014 · 3 comments

Comments

@vendethiel
Copy link

I think it'd be a good thing to let it be data-customized, instead of just having :

var field = $link.closest('.fields');
@ronakjain90
Copy link

I'm wondering why isn't there any comments or replies to this issue.

I've tried overriding default behaviour by

window.NestedFormEvents.prototype.removeFields = function(e) {
   //MyCode
};

But this however doesn't work.

@vendethiel
Copy link
Author

that worked for me :). At least as far as I can remember.

ronakjain90 added a commit to ronakjain90/nested_form that referenced this issue Mar 27, 2015
@ronakjain90
Copy link

It doesn't

window.NestedFormEvents.prototype.insertFields = function(content, assoc, link) {
   //This works.
};

But removeFields doesn't, I'm finding it strange.

window.NestedFormEvents.prototype.removeFields = function(e) {
   //MyCode
};

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants