-
-
Notifications
You must be signed in to change notification settings - Fork 72
Issue 611 - Hidden columns on copy/paste #621
Conversation
- new clipboard tests
newColumns | ||
); | ||
|
||
newVisibleColumns = R.concat(newVisibleColumns, _newColumns); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When new columns are created, they are appended after the last visible column. Both visible and "all" columns are updated to both (1) handle the copy/paste below and (2) the columns update correctly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hmm OK - I might have added the new columns after trailing hidden columns as well, but it's probably impossible to declare one way objectively better than the other. This is fine.
expect(Object.entries(res.data[0]).length).to.equal(3); | ||
expect(res.columns.length).to.equal(3); | ||
expect(res.columns[0].id).to.equal('c1'); | ||
expect(res.columns[1].id).to.equal('c2'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Check that all columns are present and in the right order after a copy/paste operation involving hidden columns
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great, apologies for letting this sit unreviewed so long! 💃
Fixes #611
Similarly to what's being done elsewhere, the clipboard needs to take into consideration both the visible columns and all the available columns when handling a copy/paste operation.
The last visible column is used to determine placement and whether new columns are required, all columns are used to determine the final set of columns if new ones are needed and their final placement based on visible ones.
Added two tests to the clipboard to check the behavior when there are hidden columns.