I have a for loop inside which I have 2 ng-selects

  1. is a single select dropdown
  2. is multiselect dropdown

Problem is with first dropdown as it is inside for loop it must have unique value selected and no duplicate value should be allowed. I have written the code for duplicate check on [ngModelChange] where it sets the selection to null. Now suppose in the first row I have selected a value and then in the second row if I select the same value for the first time it works fine that is no selection happen because of duplicate check but again if I select the same value it allow me to select the duplicate value.

I have tried making the selected value to null and I am expecting that it should not allow me to select the duplicate value how many ever times I try to.

0

There are 0 best solutions below