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

Datagrid: Unify the logic for passing row identifier in various methods #8645

Open
kwolentarski opened this issue Apr 24, 2024 · 3 comments
Open
Labels
focus: code quality Issues relating to code quality improvements team: WFM For WFM Issues type: bug 🐛 [5] Velocity rating (Fibonacci)

Comments

@kwolentarski
Copy link

kwolentarski commented Apr 24, 2024

Describe the bug

Currently datagrid methods are not consistent with the way they calculate row identifier. Examples:

  1. Using lineage, which causes bugs as top level rows don't have lineage so it will return data-index and direct child has lineage equal to data-index of parent (see in dev tools here: https://main-enterprise.demo.design.infor.com/components/datagrid/test-post-renderer-tree.html)
    image
  2. Row index:
    image
  3. Dataset index passed to formatter (rowHtml method):
    image

Expected behavior
The row index passed for methods/events should be consistent across whole datagrid

Version

  • ids-enterprise: 4.94

Platform

  • Infor Application/Team Name: Infor WFM
@tmcconechy tmcconechy added type: bug 🐛 [3] Velocity rating (Fibonacci) labels Apr 24, 2024
@tmcconechy
Copy link
Member

@kwolentarski the lineage is for trees, so is it really needed in non trees?
Will be a lot of work to add it to every event safely.

@tmcconechy tmcconechy added [5] Velocity rating (Fibonacci) team: WFM For WFM Issues and removed [3] Velocity rating (Fibonacci) labels Apr 24, 2024
@kwolentarski
Copy link
Author

I'm more than fine with not using lineage in postRenderCell, that was just example of a case where the row is different.
In some cases we would still like to use trees, and have those methods return consistently the row index.

In our current use case we are using onPostRenderCell, onDestroyCell and formatter together in Angular to cache the components instead of recreating them. Key for this cache is depending on the row value passed to those events, so we need it to be consistent in order for it to work properly.
I think aria-rowindex is the most unique one and consistent, so maybe this one is a good candidate.

@inforandy inforandy added the focus: code quality Issues relating to code quality improvements label May 8, 2024
@tmcconechy
Copy link
Member

@kwolentarski I think what we need is a test case we can use for this? Could you give me an example of onPostRenderCell and onDestroyCell? Are they NOT omitting the data.

Having a bit of an issue scoping this one as "various" when i think we need more exact cases? We added the code quality label because im not clear if its broken for what it omits or this is a general code quality suggestion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
focus: code quality Issues relating to code quality improvements team: WFM For WFM Issues type: bug 🐛 [5] Velocity rating (Fibonacci)
Projects
Status: Check Back
Development

No branches or pull requests

3 participants