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

feat: allow changing the scroll strategy #52

Merged
merged 8 commits into from
Oct 20, 2017
Merged

Conversation

willshowell
Copy link
Contributor

Fixes #20

At the moment, there seems to be something weird with the CloseScrollStrategy. I'm either using it wrong, or it isn't properly detaching. Removed from the possible options for now and tracking at angular/components#7922.

default:
config.scrollStrategy = this._overlay.scrollStrategies.noop();
break;
}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe use a separate method

config.scrollStrategy = this._getScrollStrategyInstance(this.attachedPopover.scrollStrategy);

private _getScrollStrategyInstance(s): ScrollStrategy {
  switch (s) { ... }
}

return Error(generateGenericError('scrollStrategy', strategy, VALID_SCROLL));
}

function generateGenericError(apiName: string, invalid: string, valid: string[]): string {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

invalid: any

@willshowell willshowell merged commit 644aaa9 into master Oct 20, 2017
@willshowell willshowell deleted the feat/scroll-strategies branch October 20, 2017 18:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant