I'm submitting a ... (check one with "x")
[ ] bug report => search github for a similar issue or PR before submitting
[ x] support request/question
Notice: feature requests will be ignored, submit a PR if you'd like
basically, I have tags with children tags and on click on this parent tag I have to bind all it children to
the input field, the question is how to add an item of objects to my ng module dynamically?
Current behavior
Expected behavior
Minimal reproduction of the problem with instructions (if applicable)
What do you use to build your app?. Please specify the version
angular 7
Angular version:
angular 7
ngx-chips version:
2.0.0 beta
Browser: [all | Chrome XX | Firefox XX | IE XX | Safari XX | Mobile Chrome XX | Android X.X Web Browser | iOS XX Safari | iOS XX UIWebView | iOS XX WKWebView ]
chrome
on the other way, can onAdding observable allow Array of tags
@Gbuomprisco if this is somthing already there please you help needed .
Much appreciated :)
my solution in case if anyone faced the same
[(ngModel)]="items"
then onAdding
this.items = [...this.items, ...tags];
reassign array did the job for me instead of pushing the updated array of tags
and for the observable onAdding you can return empty tag like so
return of({
value: null,
display: null,
readonly: true
});
That's the correct approach
my solution in case if anyone faced the same
[(ngModel)]="items"
then onAdding
this.items = [...this.items, ...tags];
reassign array did the job for me instead of pushing the updated array of tagsand for the observable onAdding you can return empty tag like so
return of({ value: null, display: null, readonly: true });
@HDaghash, Can you please provide full code example?
Most helpful comment
That's the correct approach