Scenario: I have 2 api's called customers and workers, I am displaying all my customers and their assigned workers using table in an component called customersas in below image:
When i click on edit button of particular customer, I am injecting that particular customer object(Ex Customer 1) values to an another component called edit(dialog component),where i am displaying injected customer properties(name,email) and the assigned worker properties(name,email,phone) into the table. as in below image:
As shown in the second image i have placed an another component(workers-list)inside the edit component which will show all workers in the dropdown:
Expected Result:
- Now i want push those selected workers from
workers-listcomponent to table present in theeditcomponent like this:
Ex pic: Worker 2 selected from the dropdown and gets added to table in edit component by clicking Add button.
- It should not add duplicates.
I am receiving
emitted workersineditcomponent, but i am unable verify duplicates and i am unablepushthe new workers totable.
Since components are many, I am giving stackblitz link.



