-
Notifications
You must be signed in to change notification settings - Fork 11
Open
Description
Hi,
I removed the restriction of a maximum distance between parent and child form member template ( was 6, why not 42? 😄 )
See PR below.
I think that , still, there is too much magic in finding the parent template.
What would you think of a PR that does away with the nessesary context template parameter and restricts the set of templates looked at to Views which are child views of Templates registered, but not of unregistered templates
Assume a structure of blaze views is like this
- view (
== Template.viewof a registered form template)- view (
== withfor example) - view (
== unregistered Template, providingcontext) - view (== unregistered template)
- view (== child view)
- view (
Now i'm proposing would pick the parent context child view like this
- if
standalone==truethen don't go up the tree - if the view is a child view of a registered Template (and no other template)
- if it is not a
standalone==trueTemplate- and also has a
context=data member, than take that one
- and also has a
- if it is not a
- if the view is a registered Template and has a has a
reactiveFormsinstance property- if it is not a
standalone==trueTemplate, take this
- if it is not a
The docs would read sth. like this
- The
ReactiveElementtakes it's context from the parentReactiveElement - If you want to exclude an element from the Form context use
standalone=true - If you want to do so for all descendants then use
standalone = "recursive"[or just anything truish, excepttrue]
Do you want to get a PR for this?
Metadata
Metadata
Assignees
Labels
No labels