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 column resets to colDef width on data update #520

Closed
wants to merge 1 commit into from

Conversation

nuclearghost
Copy link
Contributor

There was an issue where if a column was resized and then the data updated causing the watch event to fire, the width of the column would be reset to the width of the columnDef which makes for a poor user experience. This simple fix also sets the width in the columnDef allowing it to maintain the same width

@jonricaurte
Copy link
Contributor

Ok. I'll test this when I get home. It makes sense cause if the user changes the column width even for column widths that have a "", the "" should be replaced by the new width.

@jonricaurte
Copy link
Contributor

So unfortunately by doing this the ng-grid watcher for columndefs will get fired and it will rebuild the grid. Will look into this more.

@jonricaurte jonricaurte mentioned this pull request Jun 29, 2013
jonricaurte added a commit that referenced this pull request Jul 1, 2013
Now if user changes column widths, *s and percentages will not be taken
into account so column widths stay the same when grid data is being
updated.
@jonricaurte jonricaurte closed this Jul 1, 2013
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.

2 participants