tcomb-form-native icon indicating copy to clipboard operation
tcomb-form-native copied to clipboard

Access parent locals?

Open compojoom opened this issue 7 years ago • 1 comments
trafficstars

I'm trying to do something that is driving me mad.

I have the following model

t.struct({ name: t.string, t.fields: t.Object views: t.struct({ fields:t.Boolean, something: t.Boolean }) }}

Now when I display my form I want to order it like this: name, views.fields t.fields

the conditional on views.fields should render the parent fields.

I tried with a custom template, but I cannot show views.fields {locals.input.views.fields} doesn't render anything. I can only do {locals.input.views}, but this renders all elements within views.

I did a child template for views, but then I cannot access the parent? Any idea how to trick this into working without changing my model?

compojoom avatar Mar 23 '18 17:03 compojoom

anyone? @alvaromb @gcanti ?

compojoom avatar Jan 04 '19 13:01 compojoom