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

Allow for passing a positioning strategy to IgxGridToolbarHidingComponent #9065

Closed
obedurena opened this issue Feb 24, 2021 · 3 comments · Fixed by #9767
Closed

Allow for passing a positioning strategy to IgxGridToolbarHidingComponent #9065

obedurena opened this issue Feb 24, 2021 · 3 comments · Fixed by #9767
Assignees
Labels
grid: hiding grid: toolbar overlay 🧰 feature-request ✅ status: resolved Applies to issues that have pending PRs resolving them, or PRs that have already merged.

Comments

@obedurena
Copy link

We have added some more buttons to our IgxGridToolbarActions. Now on small screens we face the issue, that the dropdown of the IgxGridToolbarHidingComponent always opens right aligned, so that it gets outside the viewport on the left.

For our own buttons which open dropdowns we are able to pass overlaySettings with AutoPositionStrategy.

Is there any way to make this work for the IgxGridToolbarHidingComponent?

@github-actions
Copy link

There has been no recent activity and this issue has been marked inactive.

@github-actions github-actions bot added the status: inactive Used to stale issues and pull requests label Apr 27, 2021
@github-actions github-actions bot closed this as completed May 5, 2021
@radomirchev radomirchev removed the status: inactive Used to stale issues and pull requests label May 31, 2021
@radomirchev radomirchev reopened this May 31, 2021
@obedurena
Copy link
Author

Thanks for re-opening the request. Actually still in need for a solution to this.

@zdrawku
Copy link
Contributor

zdrawku commented Jun 23, 2021

Hey @obedurena, thank you for your idea proposal. We've implemented the desired behavior, now it would be easy for you to set a different overlaySettings by using a simple toolbar action input (not only a positionStrategy). The feature will be available at the beginning of the next week with versions 11.1.16 and 12.0.6.

Example below:

    <igx-grid-toolbar-actions>
        <igx-grid-toolbar-pinning [overlaySettings]="overlaySettingsGlobal"></igx-grid-toolbar-pinning>
        <igx-grid-toolbar-hiding [overlaySettings]="overlaySettingsAuto"></igx-grid-toolbar-hiding>
    </igx-grid-toolbar-actions>
public positionStrategyGlobal = new GlobalPositionStrategy({
      openAnimation: scaleInCenter,
      closeAnimation: scaleOutCenter
});
public overlaySettingsGlobal = {
    positionStrategy: this.positionStrategyGlobal,
    scrollStrategy: new AbsoluteScrollStrategy(),
    modal: true,
    closeOnEscape: true
};

public positionStrategyAuto = new AutoPositionStrategy();
public overlaySettingsAuto = {
    positionStrategy: this.positionStrategyAuto,
    scrollStrategy: new AbsoluteScrollStrategy(),
    modal: false,
    closeOnEscape: false
};

public positionStrategyElastic = new ElasticPositionStrategy({
    verticalDirection: VerticalAlignment.Top,
    verticalStartPoint: VerticalAlignment.Bottom,
    horizontalDirection: HorizontalAlignment.Left,
    horizontalStartPoint: HorizontalAlignment.Right
});
public overlaySettingsElastic = {
    positionStrategy: this.positionStrategyElastic,
    scrollStrategy: new AbsoluteScrollStrategy(),
    modal: true,
    closeOnEscape: true
};

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
grid: hiding grid: toolbar overlay 🧰 feature-request ✅ status: resolved Applies to issues that have pending PRs resolving them, or PRs that have already merged.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants