From c90bb1dfe5b94bb5482b8278e2908c047cea9237 Mon Sep 17 00:00:00 2001 From: Thomas Kaul <4159106+dtslvr@users.noreply.github.com> Date: Thu, 6 Aug 2026 20:10:46 +0200 Subject: [PATCH] Task/refactor abstract Material form field component to directive (#7555) * Migrate to directive * Update changelog --- CHANGELOG.md | 6 ++++++ libs/ui/src/lib/shared/abstract-mat-form-field.ts | 7 ++----- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index be20727bd..736c708e2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## Unreleased + +### Changed + +- Migrated the abstract _Material_ form field from a component to a directive + ## 3.43.0 - 2026-08-06 ### Added diff --git a/libs/ui/src/lib/shared/abstract-mat-form-field.ts b/libs/ui/src/lib/shared/abstract-mat-form-field.ts index 0d547af4e..a6ef16175 100644 --- a/libs/ui/src/lib/shared/abstract-mat-form-field.ts +++ b/libs/ui/src/lib/shared/abstract-mat-form-field.ts @@ -1,7 +1,7 @@ import { FocusMonitor } from '@angular/cdk/a11y'; import { coerceBooleanProperty } from '@angular/cdk/coercion'; import { - Component, + Directive, DoCheck, ElementRef, HostBinding, @@ -13,10 +13,7 @@ import { ControlValueAccessor, NgControl, Validators } from '@angular/forms'; import { MatFormFieldControl } from '@angular/material/form-field'; import { Subject } from 'rxjs'; -@Component({ - template: '', - standalone: false -}) +@Directive() export abstract class AbstractMatFormField implements ControlValueAccessor, DoCheck, MatFormFieldControl, OnDestroy {