Skip to content
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

fix(grid): set ConnectedPosotionStrategy for toolbar actions #10595

Merged
merged 3 commits into from
Nov 22, 2021
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,9 @@ import { ElasticPositionStrategy } from '../../services/overlay/position/elastic
import { IColumnToggledEventArgs } from '../common/events';
import { IgxColumnActionsComponent } from '../column-actions/column-actions.component';
import { IgxToggleDirective, ToggleViewCancelableEventArgs, ToggleViewEventArgs } from '../../directives/toggle/toggle.directive';
import { OverlaySettings } from '../../services/overlay/utilities';
import { HorizontalAlignment, OverlaySettings, VerticalAlignment } from '../../services/overlay/utilities';
import { IgxToolbarToken } from './token';
import { ConnectedPositioningStrategy } from '../../services/overlay/position/connected-positioning-strategy';


/**
Expand Down Expand Up @@ -43,7 +44,7 @@ export abstract class BaseToolbarDirective implements OnDestroy {
@Input()
public set overlaySettings(overlaySettings: OverlaySettings) {
this._overlaySettings = overlaySettings;
};
}

/**
* Returns overlay settings
Expand Down Expand Up @@ -85,7 +86,12 @@ export abstract class BaseToolbarDirective implements OnDestroy {
private $sub: Subscription;

private _overlaySettings: OverlaySettings = {
positionStrategy: new ElasticPositionStrategy(),
positionStrategy: new ConnectedPositioningStrategy({
horizontalDirection: HorizontalAlignment.Left,
horizontalStartPoint: HorizontalAlignment.Right,
verticalDirection: VerticalAlignment.Bottom,
verticalStartPoint: VerticalAlignment.Bottom
}),
scrollStrategy: new AbsoluteScrollStrategy(),
modal: false,
closeOnEscape: true,
Expand Down