Skip to content

fix(overlay): fix typo in property name #12927

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
Sep 14, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/cdk/overlay/overlay-directives.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -382,12 +382,12 @@ describe('Overlay directives', () => {
});

it('should allow for flexible positioning to be enabled', () => {
expect(fixture.componentInstance.connectedOverlayDirective.flexibleDiemsions).not.toBe(true);
expect(fixture.componentInstance.connectedOverlayDirective.flexibleDimensions).not.toBe(true);

fixture.componentInstance.flexibleDimensions = true;
fixture.detectChanges();

expect(fixture.componentInstance.connectedOverlayDirective.flexibleDiemsions).toBe(true);
expect(fixture.componentInstance.connectedOverlayDirective.flexibleDimensions).toBe(true);
});

it('should allow for growing after open to be enabled', () => {
Expand Down
8 changes: 5 additions & 3 deletions src/cdk/overlay/overlay-directives.ts
Original file line number Diff line number Diff line change
Expand Up @@ -183,8 +183,10 @@ export class CdkConnectedOverlay implements OnDestroy, OnChanges {

/** Whether the overlay's width and height can be constrained to fit within the viewport. */
@Input('cdkConnectedOverlayFlexibleDimensions')
get flexibleDiemsions() { return this._flexibleDimensions; }
set flexibleDiemsions(value: boolean) { this._flexibleDimensions = coerceBooleanProperty(value); }
get flexibleDimensions() { return this._flexibleDimensions; }
set flexibleDimensions(value: boolean) {
this._flexibleDimensions = coerceBooleanProperty(value);
}

/** Whether the overlay can grow after the initial open when flexible positioning is turned on. */
@Input('cdkConnectedOverlayGrowAfterOpen')
Expand Down Expand Up @@ -310,7 +312,7 @@ export class CdkConnectedOverlay implements OnDestroy, OnChanges {
private _createPositionStrategy(): FlexibleConnectedPositionStrategy {
const strategy = this._overlay.position()
.flexibleConnectedTo(this.origin.elementRef)
.withFlexibleDimensions(this.flexibleDiemsions)
.withFlexibleDimensions(this.flexibleDimensions)
.withPush(this.push)
.withGrowAfterOpen(this.growAfterOpen)
.withViewportMargin(this.viewportMargin)
Expand Down
14 changes: 14 additions & 0 deletions src/lib/schematics/update/material/data/property-names.ts
Original file line number Diff line number Diff line change
Expand Up @@ -337,6 +337,20 @@ export const propertyNames: VersionChanges<MaterialPropertyNameData> = {
}
}
]
},

// TODO(devversion): this should be part of the V6 to V7 upgrade
{
pr: 'https://github.com/angular/material2/pull/12927',
changes: [
{
replace: 'flexibleDiemsions',
replaceWith: 'flexibleDimensions',
whitelist: {
classes: ['CdkConnectedOverlay']
}
}
]
}
]
};