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

MaterialDataTable selection wrong after sorting #64

Open
eric-eldard opened this issue Jun 19, 2017 · 0 comments
Open

MaterialDataTable selection wrong after sorting #64

eric-eldard opened this issue Jun 19, 2017 · 0 comments
Assignees
Labels
Milestone

Comments

@eric-eldard
Copy link
Contributor

Steps to recreate:

  1. Navigate to http://gwtmaterialdesign.github.io/gwt-material-demo/#datatable
  2. Scroll down to "Customize your data table"
  3. Check the first table row (First Name = "Field 0")
  4. Sort by First Name, ascending
  5. Sort by First Name, descending

Expected result:

  • The record with First Name "Field 0" remains checked

Actual result:

  • The first table row remains checked, which is now First Name "Field 9"

Comments:

  • I believe the problem is in AbstractDataView#renderRows() under the comment "Replace the rows element with the existing indexes element." The backing data (TableRows) is being sorted and rewritten into the existing RowComponents instead of each TableRow being permanently tied to a RowComponent and changing the order of the RowComponents in the DOM.
@BenDol BenDol self-assigned this Jul 28, 2017
@BenDol BenDol added the bug label Jul 28, 2017
@BenDol BenDol added this to the 2.0 milestone Jul 31, 2017
@kevzlou7979 kevzlou7979 modified the milestones: 2.0, 2.0.1 Dec 10, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants