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


Copy link

@winterthediplomat winterthediplomat 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

`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.
Copy link
Contributor Author

@winterthediplomat winterthediplomat 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
Copy link

@mdwragg 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
None yet
None yet
Linked issues

Successfully merging this pull request may close these issues.

2 participants