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

TreeGrid: selectedRows is reporting incorrect indexes, occurs after updating tree data with rows selected #5631

Closed
claudenbach opened this issue Sep 21, 2021 · 5 comments · Fixed by #5634
Assignees
Labels
for: customer Issue came from a customer team: landmark For Landmark issues type: bug 🐛 [3] Velocity rating (Fibonacci)

Comments

@claudenbach
Copy link
Contributor

Describe the bug
A tree grid with select of 'mixed' is reporting incorrect selected row indexes. Occurs when row(s) are selected and then the tree is updated following an expand action that inserts additional rows into the tree.

Steps to reproduce the behavior:

  1. Using the attached test-tree-selected-rows-idx.html
  2. Click on the checkbox for 'Z' row
  3. Click on the expand icon for 'A' row
  4. Click on the checkbox for 'AA' row
  5. Click on the expand icon for 'AA' row
  6. Click on the checkbox for 'BBB' row
  7. Click on Selected Rows Idx button on the toolbar and notice the reported indexes

Refresh the browser

  1. Click on the expand icon for 'A' row
  2. Click on the expand icon for 'AA' row
  3. Click on the checkbox for 'AA' row, 'BBB' row, 'Z' row
  4. Click on Selected Rows Idx button on the toolbar and notice the reported indexes

Expected behavior:
The method selectedRows() returns the valid idx for the selected rows.

Seems like the internal global variable _selectedRows needs to be updated when rows are added to the treeGrid following an expand row to accurately reflect the actual row index.

Version

  • ids-enterprise: v4.55.0-dev
@claudenbach
Copy link
Contributor Author

Git-5631.zip

@tmcconechy tmcconechy added [3] Velocity rating (Fibonacci) team: landmark For Landmark issues type: bug 🐛 labels Sep 21, 2021
@tmcconechy tmcconechy added this to Triage in Enterprise (Next) Sprint Grooming via automation Sep 21, 2021
@claudenbach claudenbach added type: bug 🐛 and removed type: bug 🐛 [3] Velocity rating (Fibonacci) labels Sep 21, 2021
@tmcconechy tmcconechy added the [3] Velocity rating (Fibonacci) label Sep 21, 2021
@tmcconechy
Copy link
Member

The selected rows do behave a bit different in the tree because the data is changed. But we will have a look at this when we can.

@claudenbach
Copy link
Contributor Author

Thanks! I do have a customer ticket tied to this issue. The only workaround I could come up with is to make the selections after the tree has been expanded to include the necessary rows.

@tmcconechy tmcconechy added the for: customer Issue came from a customer label Sep 21, 2021
@tmcconechy
Copy link
Member

@deep7102 can take a look and see how complicated this is

@nganotice
Copy link

This has been QA tested and passed on v4.56.0-dev.

https://main-enterprise.demo.design.infor.com/components/datagrid/test-tree-selected-rows-idx.html
Screen Recording 2021-09-23 at 5 58 06 PM

Moving this ticket to Done.

Thanks!

@nganotice nganotice moved this from Ready for QA (beta) to Done in Enterprise 4.56.x (Sept 2021) Sprint Sep 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
for: customer Issue came from a customer team: landmark For Landmark issues type: bug 🐛 [3] Velocity rating (Fibonacci)
Projects
No open projects
Development

Successfully merging a pull request may close this issue.

4 participants