I have a table that displays data. Specifically, employee_ids.
When I select a row in the table component, an employee_ids field in a form will be populated with the employee_ids from the selected row data.
The employee_ids field is populated correctly.
But here is what I want to do...
- Allow user to remove employee_ids in the record. (This works)
- Allow user to select other employee_ids BUT only employee_ids that are not already contained within the table component itself. In other words, if employee_ids exist in one row in the table component, they cannot be added to another row.
I have tried to Disable the option in the multi-select component from being selected using the following logic:
{{teamTable.data.employee_ids[i].includes(item.employee_id)}}
but this results in only Disabling the first option in the multi-select (which causes #1 above not to work.)
I also tried {{_.includes(teamTable.data.employee_ids[i], item.employee_id)}}
but no luck.
Any help greatly appreciated!
Here is what the array of employee_ids looks like
then only getting the first array
then the first ID in the first array
So even when attempting to iterate in the Disabled field using
[i][i]
like so:{{_.includes(teamTable.data.employee_ids[i][i], item.employee_id)}}
It does not work.