When an employer needs to assign a specific employee and premium amount, they can click on the "Add Employee" button to reveal another form with a dropdown menu of employees and an input field for the premium amount.
<select>
<option>John</option>
<option>George</option>...
</select>
<input type="text" placeholder="Amount"/>
I am using a shared ko.observableArray to manage dynamically added select boxes and inputs, which is functioning properly...
An issue arises when the employer selects the same employee more than once (which is not ideal). I attempted to create a new array using ko.computed that would filter out previously selected employees, but so far without success.
Ideally, a selected option should be disabled or hidden from other dropdown menus.
Has anyone successfully addressed this issue before?