Skip to content
Advertisement

How to disable options from mat-select based on option selected?

I was working on a project involving mat-select. I have two mat-selects,there I want to do two things:

  1. When I select ‘all’ option in either of the mat-selects all the other options should get disabled.
  2. When I select an option in one mat-select,that option needs to get disabled in the other mat-select This is the stackblitz link of the project

Thanks in advance, for the help

Advertisement

Answer

Use this in you second optiongroup

JavaScript
User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement