1

I have one object array from that one property have two drive letter like C and D.

Now I have another string array which have A-Z value in p-dropdown I want to disabled above C and D from dropdown .So user can not select that both drive letter from my pr-dropdown. By using below code only C is disabled from p-dropdown :

    for (const item of this.vmWindowsFileSystemDetails) {
      for (const result of driveLetters) {
        if (item.driveLetter.replace(':', '') ===  result) {
          this.isletterPresent = true ;
          this.dropDownDriveLetterOptions.push({ label: result + ':', value: result,  disabled: this.isletterPresent});
        } else {
          this.isletterPresent = false ;
          this.dropDownDriveLetterOptions.push({ label: result + ':', value: result,  disabled: this.isletterPresent});
        }
      }
  }

0 Answers0