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 regression around column resize state being retained too aggresively #278

Merged
merged 1 commit into from
Jan 9, 2018

Conversation

wcjordan
Copy link
Member

@wcjordan wcjordan commented Jan 5, 2018

Only retain when the prop is undefined, not when explicitly set to false.

@miskreant @quixotically could one of you take a look when you get a chance?

Description

#276 is happening because we're retaining the old column state even when resizing is stopped.

Motivation and Context

Fix #276

How Has This Been Tested?

Tested on the test case from #268 and the column resize example.

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.

@@ -9,109 +9,78 @@ const { DateCell, ImageCell, LinkCell, TextCell } = require('./helpers/cells');
const { Table, Column, Cell } = require('fixed-data-table-2');
const React = require('react');

Copy link
Member Author

Choose a reason for hiding this comment

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

You can ignore changes in this file. I accidentally committed when working on #268. Reverting now

@@ -1177,7 +1177,9 @@ var FixedDataTable = createReactClass({
}

var columnResizingData;
if (props.isColumnResizing || (oldState && oldState.isColumnResizing)) {
Copy link
Member Author

Choose a reason for hiding this comment

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

Just adding the props.isColumnResizing === undefined condition here so we only use oldState when isColumnResizing is not specified in the props.

Copy link
Contributor

@miskreant miskreant left a comment

Choose a reason for hiding this comment

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

This lgtm @wcjordan

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.

Column resize problems
2 participants