I have a modal showing a form with with ng-select that should use for both adding new element to a list, but also to edit existing elements. The selected items are pushed to an array in the element
In adding, everything works well, but in edit I do not see the element`s selected items.
Don't know if relevant, but when adding, I'm using @ViewChild(NgSelectComponent).clearModel()
to show an empty form (I know it's not the syntax, it's just for the post.).
How can I programmatically select items in ng-select inside a modal? All I saw was to change the list and none mentioned a modal.
Thanks.