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

gt - WIP UncontrolledTable #440

Merged
merged 11 commits into from
Aug 31, 2018
Merged

gt - WIP UncontrolledTable #440

merged 11 commits into from
Aug 31, 2018

Conversation

gthomas-appfolio
Copy link
Contributor

  • Name is temp, maybe combine with Table

[...selected, value];

this.setState({ selected: newSelection },
this.props.onSelect(newSelection)
Copy link
Contributor

Choose a reason for hiding this comment

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

Should this be a callback?

const { page, sort } = this.state;
const { ascending, column } = sort;
const { columns, expandable, pageSize, paginated, rowClassName, rowExpanded, rows, selectable, onSelect, ...props } = this.props;
const cols = columns.map(col => (col.sortable !== false) ?
Copy link
Contributor

Choose a reason for hiding this comment

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

can you just do col.sortable here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It looks odd, but am supporting a "default" of sortable == true, without it actually being set to true. This explicitly checks for false.

type="checkbox"
className="mx-1"
checked={this.allSelected}
onChange={() => this.toggleAll()}
Copy link
Contributor

Choose a reason for hiding this comment

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

this can just be this.toggleAll

assert.equal(ths.length, columns.length + 1); // For selectable column
});

it('should call onSelect when selectable row picked');
Copy link
Contributor

Choose a reason for hiding this comment

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

Is there something we need to wait for for these tests?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No, just getting up to speed with enzyme 3 test changes

@gthomas-appfolio gthomas-appfolio merged commit 7e19f6f into master Aug 31, 2018
@gthomas-appfolio gthomas-appfolio deleted the wipUncontrolledTable branch August 31, 2018 05:24
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