Skip to content

fix(core): Return promise from handleWindowResize method #4512

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 1 commit into from
Oct 13, 2015

Conversation

nkoterba
Copy link
Contributor

Current documentation says Grid.prototype.handleWindowResize returns a Promise (https://github.com/angular-ui/ui-grid/blob/fe00489/src/js/core/factories/Grid.js#L263) but in fact the internal Grid.prototype.handleWindowResize method was never returning the Grid.prototype.queueRefresh promise (https://github.com/angular-ui/ui-grid/blob/fe00489/src/js/core/factories/Grid.js#L1513). This fix allows ui-grid users to wait until the grid is correctly sized before performing certain actions (like scrolling) which require an accurately-sized grid.

Current documentation says Grid.prototype.handleWindowResize returns a Promise (https://github.com/angular-ui/ui-grid/blob/fe00489/src/js/core/factories/Grid.js#L263) but in fact the internal Grid.prototype.handleWindowResize method was never returning the Grid.prototype.queueRefresh promise (https://github.com/angular-ui/ui-grid/blob/fe00489/src/js/core/factories/Grid.js#L1513). This fix allows ui-grid users to wait until the grid is correctly sized before performing certain actions (like scrolling) which require an accurately-sized grid.
swalters added a commit that referenced this pull request Oct 13, 2015
fix(core): Return promise from `handleWindowResize` method
@swalters swalters merged commit e89598a into angular-ui:master Oct 13, 2015
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.

3 participants