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

Column grouping doesn't work if columns with same prop values present in different groups #696

Open
RK-cuongnq opened this issue Feb 26, 2025 · 4 comments
Assignees
Labels
feature New feature or request low Minor improvement/issue

Comments

@RK-cuongnq
Copy link

@revolist @m2a2x
I am using @revolist/revogrid for my vue3 project. But I encountered an issue.

I want a long header with multiple children. But when I scroll horizontally, the header loss of background color. I checked, and it seems to be due to the transform: translateX being calculated incorrectly.

You can check again and see my evidence I attached.

Thank you, and look forward to receiving a response from you.

scroll.mp4
@m2a2x
Copy link
Collaborator

m2a2x commented Feb 26, 2025

Hi @RK-cuongnq
thanks for posting, seems to be an edge case bug, but not sure

Is there are way for you to make me a codesandbox with this example?
you can take https://codesandbox.io/p/sandbox/rg-start-vue-3-composition-api-3775m4 as starting point and make these kind of headers, I'll take a look how complex is the fix.

Thank you!

@m2a2x m2a2x self-assigned this Feb 26, 2025
@m2a2x m2a2x added bug Something isn't working low Minor improvement/issue labels Feb 26, 2025
@RK-cuongnq
Copy link
Author

Hi @m2a2x
I don't know if it's a bug or not, but when the "prop" properties in "children" have the same value then this situation will occur. (see the evidence I attached).
Image

I edited "prop" is to be unique, then this problem solved.

You can check in the codesandbox:
https://codesandbox.io/p/devbox/rg-start-vue-3-composition-api-forked-jrkrgx?workspaceId=ws_N9vwoAYLaiHKZNRbsnM3aN

Thank you!

@m2a2x
Copy link
Collaborator

m2a2x commented Feb 27, 2025

Yes, grouping is based on props atm
{ name: "A9", prop: "A99", size: 55 },
you have this one repeating and so it doesn't now where the grouping starts
could you stick with uniq props in your case?

@m2a2x m2a2x added feature New feature or request and removed bug Something isn't working labels Feb 27, 2025
@m2a2x m2a2x changed the title The header background color lost when scrolling horizontally Column grouping doesn't work if columns with same prop values present in different groups Feb 27, 2025
m2a2x added a commit that referenced this issue Feb 27, 2025
@m2a2x
Copy link
Collaborator

m2a2x commented Feb 27, 2025

@RK-cuongnq please verify if the fix is working, I made it for you hence already investigated a problem.
#700

Changes are dangerous, so I would prefer double look and test.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request low Minor improvement/issue
Projects
None yet
Development

No branches or pull requests

2 participants