How can i make transparent layer for t.struct({})
MomenYasser opened this issue · 0 comments
MomenYasser commented
Version
- tcomb-form v0.9.17.
- react v15.6.1
Expected behavior
I need to make this Schema:
const schema = t.struct({
section1: t.struct({
name: t.String,
phone: t.Number
}),
section2: t.struct({
email: t.String,
address: t.String
})
});
And after submitting the form i'm expecting this value object:
{
name: 'bla',
phone: '123456'
email: 'bla@bla.com',
address: 'blabla'
}
Actual behavior
{
section1: {
name: 'bla',
phone: '123456'
},
section2: {
email: 'bla@bla.com',
address: 'blabla'
}
}
Is there's anyway to make sections transparent Just UI layer ?
Thanks