Skip to content

Commit 543351f

Browse files
committed
refactor(material/expansion): remove incorrect inputs overrides
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 3500908 commit 543351f

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
@@ -62,7 +62,7 @@ export class MatAccordion extends CdkAccordion implements MatAccordionBase, Afte
6262
ngOnDestroy(): void;
6363
togglePosition: MatAccordionTogglePosition;
6464
// (undocumented)
65-
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, false, never>;
65+
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, false, never>;
6666
// (undocumented)
6767
static ɵfac: i0.ɵɵFactoryDeclaration<MatAccordion, never>;
6868
}
@@ -129,7 +129,7 @@ export class MatExpansionPanel extends CdkAccordionItem implements AfterContentI
129129
get togglePosition(): MatAccordionTogglePosition;
130130
set togglePosition(value: MatAccordionTogglePosition);
131131
// (undocumented)
132-
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"], false, never>;
132+
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"], false, never>;
133133
// (undocumented)
134134
static ɵfac: i0.ɵɵFactoryDeclaration<MatExpansionPanel, [{ optional: true; skipSelf: true; }, null, null, null, null, { optional: true; }, { optional: true; }]>;
135135
}

0 commit comments

Comments
 (0)