From 6d4e5b7ae83a8476b1cceaf5f1a1f2d8fea466e8 Mon Sep 17 00:00:00 2001
From: jojohoch <joachim.hoch@iqb.hu-berlin.de>
Date: Tue, 23 May 2023 13:15:29 +0200
Subject: [PATCH] Use new mdc based material classes in
 InputBackgroundColorDirective

---
 .../common/directives/input-background-color.directive.ts | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/projects/common/directives/input-background-color.directive.ts b/projects/common/directives/input-background-color.directive.ts
index 54ff8c29d..bbde71183 100644
--- a/projects/common/directives/input-background-color.directive.ts
+++ b/projects/common/directives/input-background-color.directive.ts
@@ -2,9 +2,7 @@ import {
   Directive, ElementRef, Input, OnChanges, SimpleChanges
 } from '@angular/core';
 
-@Directive({
-  selector: '[aspectInputBackgroundColor]'
-})
+@Directive({ selector: '[aspectInputBackgroundColor]'})
 export class InputBackgroundColorDirective implements OnChanges {
   @Input() backgroundColor!: string;
   @Input() appearance!: string;
@@ -23,9 +21,9 @@ export class InputBackgroundColorDirective implements OnChanges {
   private setBackgroundColor(): void {
     let targetElements: HTMLElement[];
     if (this.appearance === 'outline') {
-      targetElements = this.elementRef.nativeElement.querySelector('div.mat-form-field-outline')?.children;
+      targetElements = this.elementRef.nativeElement.querySelector('div.mdc-notched-outline')?.children;
     } else {
-      targetElements = [this.elementRef.nativeElement.querySelector('div.mat-form-field-flex')];
+      targetElements = [this.elementRef.nativeElement.querySelector('div.mat-mdc-form-field-flex')];
     }
     // This fails, when component is not set up yet, therefore the extra check
     if (targetElements) {
-- 
GitLab