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(columns): don't reset resized columns on data reset by default #4202

Merged
merged 1 commit into from Aug 18, 2015

Conversation

SomeKittens
Copy link
Contributor

Previously, if a user resized a column and the data were reset, the column size would also be reset. Instead, disable this behavior by default and add a flag (allowCustomWidthOverride) to allow it. Code originally taken from mage-eag@966c4d9

Fixes #4005

Previously, if a user resized a column and the data were reset, the column size
would also be reset.  Instead, disable this behavior by default and add a flag
(`allowCustomWidthOverride`) to allow it.
Code originally taken from mage-eag@966c4d9

Fixes angular-ui#4005
@swalters
Copy link
Contributor

@c0bra @PaulL1 would you guys also take a look at this. It looks good to me, other than we probably need to document this new flag.

swalters added a commit that referenced this pull request Aug 18, 2015
fix(columns): don't reset resized columns on data reset by default
@swalters swalters merged commit ff9de89 into angular-ui:master Aug 18, 2015
@cedejic
Copy link

cedejic commented Aug 28, 2015

Hi,

I may be wrong, but I believe you should also set column's hasCustomWidth property in uiGridSaveStateService::restoreColumns. So when you load state from e.g. database columns would set up properly.

              if ( grid.options.saveWidths ){
                currentCol.width = columnState.width;
                currentCol.hasCustomWidth = true;
              }

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

3 participants