Closed monarchwadia closed 8 years ago
Actually you can nest at arbitrary level:
var options = {
fields: { // <= first level of nesting: struct
formField1: {
item: { // <= second level of nesting: list
fields: { // <= third level of nesting: struct
foo: {
help: 'Foo refers to something'
},
bar: {
help: 'Bar refers to something else'
},
baz: {
help: 'Baz is rarely used'
}
}
}
}
}
};
@gcanti I have a similar problem. I have to modify the options of bar
based on what is selected in foo
individually for each item in the formField1
list. Is that possible atm.? Using item
I can modify all the items in the list, but not a particular one, or?
@asbjornenge
Is that possible atm?
In general and with the current API I'd say no, however this is an example with an hacky solution: https://github.com/gcanti/tcomb-form/issues/238 maybe can be useful in your use case
@gcanti worked very well, thanks a bunch! :smile:
:+1:
It would be great to be able to render options like
help
text for nested fields (for example, for the fields in a struct passed into at.list
)Something like the following would be cool; Note though that I'm not sure that the structure below could be used for multiple nesting levels.