-
Notifications
You must be signed in to change notification settings - Fork 649
Nested Form click scope? #403
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Since you nest your There is workaround though. The flip side of that is that your form isn't pure JSON anymore. Hope that answers your question. |
Thanks @davidlgj ... I though it was something with an isolate scope, but didn't realize which directive was making the isolate scope until after posting (and then I saw the class="ng-isolate-scope" sitting there ;) I made a fix for it in the buttonClick function, which allows to add an "inheritFunc": true onto the button item in the form. When buttonClick fires and inheritFunc is set, it calls buttonClick in the $parent sf-schema's scope instead. (I wonder if there is a better way than scope.$parent.$parent.$parent to call though?)
|
Hello, I am working on implementing a nested sf-form (similar to #123)
I have created a custom decorator "child-form" with a simple template:
<div sf-schema="form.child.schema" sf-form="form.child.form" sf-model="$$value$$"></div>
In my FormController, I have:
Everything is working, except the
"onClick": "childSubmit()"
.It works if I change it to
"onClick": "$parent.$parent.$parent.childSubmit()"
.Wondering why that is, and how I could overcome this?
The text was updated successfully, but these errors were encountered: