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: re-generate `selectedRows` when data are changed #63

Merged
merged 1 commit into from Oct 12, 2016

Conversation

Projects
None yet
2 participants
@alfateam123
Copy link
Contributor

alfateam123 commented Oct 10, 2016

This PR aims to fix #62 by re-generating the selectedRows array when data are changed.

As explained in the related issue, selectedRows contains references to objects that are not available inside _internalData when the dataChanged(data.*) observer is called. The missed update breaks the logic inside _selectRow, leading it to add items that the user considers "not selected" to selectedRows.

Fixes #62

fix: re-generate `selectedRows` when data are changed
`selectedRows` is now created again every time data are changed
to avoid "ghost selections", that are rows that cannot be removed
from `selectedRows`, as the rows don't exist anymore.

Add a simple test to show an example of the "ghost selections" issue.
@alfateam123

This comment has been minimized.

Copy link
Contributor Author

alfateam123 commented Oct 11, 2016

hello, it seems that the build errored on Travis. Looks like the headless browser took too long to start or something like that. Things ran fine on my machine: can someone look into that?

@mdwragg mdwragg merged commit 493bc2a into predixdesignsystem:master Oct 12, 2016

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
@mdwragg

This comment has been minimized.

Copy link
Contributor

mdwragg commented Oct 12, 2016

Thanks for your thorough PR @alfateam123 !!! 💯

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.