You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to create a custom input type (multiField) which displays multiple arbitrary inputs within itself. It seems like the formly-field directive should make this reasonably doable. I should just be able to put a list of fields inside the JSON element for the multiField element and have them show up.
The problem is that this only seems to work if I put those fields in a fieldGroup property. If I put them elsewhere, a bunch of properties don't get tacked on and so the fields don't work. (Obviously I'm pointing the template to where the fields are in each case.)
This way works:
{
type: 'multiField',
fieldGroup: [
// some fields
]
}
Normally I would just do it the first way because obviously that's what works. But I'm trying to upgrade an old system from angular-formly, and I think some of the existing data does it the second way. So I'd really like to make that work too.
I'm trying to create a custom input type (
multiField
) which displays multiple arbitrary inputs within itself. It seems like theformly-field
directive should make this reasonably doable. I should just be able to put a list of fields inside the JSON element for the multiField element and have them show up.The problem is that this only seems to work if I put those fields in a
fieldGroup
property. If I put them elsewhere, a bunch of properties don't get tacked on and so the fields don't work. (Obviously I'm pointing the template to where the fields are in each case.)This way works:
This way does not:
Normally I would just do it the first way because obviously that's what works. But I'm trying to upgrade an old system from angular-formly, and I think some of the existing data does it the second way. So I'd really like to make that work too.
Live demo: https://stackblitz.com/edit/ngx-formly-ui-bootstrap-4jiein?file=src%2Fapp%2Fapp.module.ts
The text was updated successfully, but these errors were encountered: