Skip to content

Commit 729dfc5

Browse files
authored
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.
1 parent b4bb466 commit 729dfc5

File tree

3 files changed

+2
-5
lines changed

3 files changed

+2
-5
lines changed

src/material/expansion/accordion.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ import {MatExpansionPanelHeader} from './expansion-panel-header';
3232
@Directive({
3333
selector: 'mat-accordion',
3434
exportAs: 'matAccordion',
35-
inputs: ['multi'],
3635
providers: [
3736
{
3837
provide: MAT_ACCORDION,

src/material/expansion/expansion-panel.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,6 @@ export const MAT_EXPANSION_PANEL_DEFAULT_OPTIONS =
8181
templateUrl: 'expansion-panel.html',
8282
encapsulation: ViewEncapsulation.None,
8383
changeDetection: ChangeDetectionStrategy.OnPush,
84-
inputs: ['disabled', 'expanded'],
85-
outputs: ['opened', 'closed', 'expandedChange'],
8684
animations: [matExpansionAnimations.bodyExpansion],
8785
providers: [
8886
// Provide MatAccordion as undefined to prevent nested expansion panels from registering

tools/public_api_guard/material/expansion.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ export class MatAccordion extends CdkAccordion implements MatAccordionBase, Afte
5959
ngOnDestroy(): void;
6060
togglePosition: MatAccordionTogglePosition;
6161
// (undocumented)
62-
static ɵdir: i0.ɵɵDirectiveDeclaration<MatAccordion, "mat-accordion", ["matAccordion"], { "multi": { "alias": "multi"; "required": false; }; "hideToggle": { "alias": "hideToggle"; "required": false; }; "displayMode": { "alias": "displayMode"; "required": false; }; "togglePosition": { "alias": "togglePosition"; "required": false; }; }, {}, ["_headers"], never, true, never>;
62+
static ɵdir: i0.ɵɵDirectiveDeclaration<MatAccordion, "mat-accordion", ["matAccordion"], { "hideToggle": { "alias": "hideToggle"; "required": false; }; "displayMode": { "alias": "displayMode"; "required": false; }; "togglePosition": { "alias": "togglePosition"; "required": false; }; }, {}, ["_headers"], never, true, never>;
6363
// (undocumented)
6464
static ɵfac: i0.ɵɵFactoryDeclaration<MatAccordion, never>;
6565
}
@@ -128,7 +128,7 @@ export class MatExpansionPanel extends CdkAccordionItem implements AfterContentI
128128
get togglePosition(): MatAccordionTogglePosition;
129129
set togglePosition(value: MatAccordionTogglePosition);
130130
// (undocumented)
131-
static ɵcmp: i0.ɵɵComponentDeclaration<MatExpansionPanel, "mat-expansion-panel", ["matExpansionPanel"], { "disabled": { "alias": "disabled"; "required": false; }; "expanded": { "alias": "expanded"; "required": false; }; "hideToggle": { "alias": "hideToggle"; "required": false; }; "togglePosition": { "alias": "togglePosition"; "required": false; }; }, { "opened": "opened"; "closed": "closed"; "expandedChange": "expandedChange"; "afterExpand": "afterExpand"; "afterCollapse": "afterCollapse"; }, ["_lazyContent"], ["mat-expansion-panel-header", "*", "mat-action-row"], true, never>;
131+
static ɵcmp: i0.ɵɵComponentDeclaration<MatExpansionPanel, "mat-expansion-panel", ["matExpansionPanel"], { "hideToggle": { "alias": "hideToggle"; "required": false; }; "togglePosition": { "alias": "togglePosition"; "required": false; }; }, { "afterExpand": "afterExpand"; "afterCollapse": "afterCollapse"; }, ["_lazyContent"], ["mat-expansion-panel-header", "*", "mat-action-row"], true, never>;
132132
// (undocumented)
133133
static ɵfac: i0.ɵɵFactoryDeclaration<MatExpansionPanel, [{ optional: true; skipSelf: true; }, null, null, null, null, { optional: true; }, { optional: true; }]>;
134134
}

0 commit comments

Comments
 (0)