Skip to content

CdkConnectedOverlay offset from ConnectionPositionPair has no effect #10449

@abdulkareemnalband

Description

@abdulkareemnalband

Bug

offset from ConnectionPositionPair has no effect in CdkConnectedOverlay

What is the expected behavior?

Overlay should be positioned based on offset from cdkConnectedOverlayPositions Input

What is the current behavior?

offsets are being ignored

What are the steps to reproduce?

https://stackblitz.com/edit/cdkoverlayexample-offset?file=app%2Fabcd%2Fabcd.component.html

What is the use-case or motivation for changing an existing behavior?

each position should have its own offset values, like for tooltips

Which versions of Angular, Material, OS, TypeScript, browsers are affected?

Angular CLI: 1.7.2
Node: 8.9.4
OS: win32 x64
Angular: 5.2.7
... animations, common, compiler, compiler-cli, core, forms
... http, language-service, platform-browser
... platform-browser-dynamic, router

@angular/cdk: 5.2.3
@angular/cli: 1.7.2
@angular/material: 5.2.3
@angular-devkit/build-optimizer: 0.3.2
@angular-devkit/core: 0.3.2
@angular-devkit/schematics: 0.3.2
@ngtools/json-schema: 1.2.0
@ngtools/webpack: 1.10.1
@schematics/angular: 0.3.2
@schematics/package-update: 0.3.2
typescript: 2.7.2
webpack-bundle-analyzer: 2.11.0
webpack: 3.11.0

Is there anything else we should know?

https://github.com/angular/material2/blob/7abb1db79a2cb5e7978d38c422fcb7622710be70/src/cdk/overlay/overlay-directives.ts#L365

here withOffset should work with offset from positions array
also for withFallbackPosition offset should be passed

Metadata

Metadata

Assignees

Labels

P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgent

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions