From 729dfc5203e15d237db211135db6ecacafb62d56 Mon Sep 17 00:00:00 2001 From: Paul Gschwendtner Date: Wed, 20 Dec 2023 11:12:13 +0100 Subject: [PATCH] refactor(material/expansion): remove incorrect `inputs` overrides (#28310) The bases classes of the CDK already define the input with transforms. Technically the new `inputs` declarations override the full metadata, loosing the transforms. This is currently a bug in the framework where components relied on the behavior that transforms were inherited independently. This commit fixes this and cleans up the code. The inputs do not need to be re-declared. --- src/material/expansion/accordion.ts | 1 - src/material/expansion/expansion-panel.ts | 2 -- tools/public_api_guard/material/expansion.md | 4 ++-- 3 files changed, 2 insertions(+), 5 deletions(-) diff --git a/src/material/expansion/accordion.ts b/src/material/expansion/accordion.ts index caf472cd4ab6..980a142c1b7e 100644 --- a/src/material/expansion/accordion.ts +++ b/src/material/expansion/accordion.ts @@ -32,7 +32,6 @@ import {MatExpansionPanelHeader} from './expansion-panel-header'; @Directive({ selector: 'mat-accordion', exportAs: 'matAccordion', - inputs: ['multi'], providers: [ { provide: MAT_ACCORDION, diff --git a/src/material/expansion/expansion-panel.ts b/src/material/expansion/expansion-panel.ts index 0c67866314ff..fea721daa924 100644 --- a/src/material/expansion/expansion-panel.ts +++ b/src/material/expansion/expansion-panel.ts @@ -81,8 +81,6 @@ export const MAT_EXPANSION_PANEL_DEFAULT_OPTIONS = templateUrl: 'expansion-panel.html', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, - inputs: ['disabled', 'expanded'], - outputs: ['opened', 'closed', 'expandedChange'], animations: [matExpansionAnimations.bodyExpansion], providers: [ // Provide MatAccordion as undefined to prevent nested expansion panels from registering diff --git a/tools/public_api_guard/material/expansion.md b/tools/public_api_guard/material/expansion.md index 485775ed56a7..a3a42fa79b63 100644 --- a/tools/public_api_guard/material/expansion.md +++ b/tools/public_api_guard/material/expansion.md @@ -59,7 +59,7 @@ export class MatAccordion extends CdkAccordion implements MatAccordionBase, Afte ngOnDestroy(): void; togglePosition: MatAccordionTogglePosition; // (undocumented) - static ɵdir: i0.ɵɵDirectiveDeclaration; + static ɵdir: i0.ɵɵDirectiveDeclaration; // (undocumented) static ɵfac: i0.ɵɵFactoryDeclaration; } @@ -128,7 +128,7 @@ export class MatExpansionPanel extends CdkAccordionItem implements AfterContentI get togglePosition(): MatAccordionTogglePosition; set togglePosition(value: MatAccordionTogglePosition); // (undocumented) - static ɵcmp: i0.ɵɵComponentDeclaration; + static ɵcmp: i0.ɵɵComponentDeclaration; // (undocumented) static ɵfac: i0.ɵɵFactoryDeclaration; }