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: vue table example #887

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

fix: vue table example #887

wants to merge 2 commits into from

Conversation

tuanalumi
Copy link

@tuanalumi tuanalumi commented Nov 25, 2024

This PR applies the same calculation from React to Vue example, which would fix:

  • Lagging issue when scrolling
  • Wrong row height

Copy link
Contributor

@kouts kouts left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the fix @tuanalumi

Copy link

nx-cloud bot commented Nov 25, 2024

☁️ Nx Cloud Report

CI is running/has finished running commands for commit 285ea90. As they complete they will appear below. Click to see the status, the terminal output, and the build insights.

📂 See all runs for this CI Pipeline Execution


✅ Successfully ran 2 targets

Sent with 💌 from NxCloud.

:key="virtualRow.key"
:style="{ transform: `translateY(${virtualRow.start}px)` }"
:style="{
transform: `translateY(${virtualRow.start - index * virtualRow.size}px)`,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmm this looks wrong, start should be calculated correctly

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure about what you're suggesting.

The calculation looks correct and that's the same with React version. I tested with this: https://stackblitz.com/github/tuanalumi/virtual/tree/main/examples/vue/table?embed=1&theme=light&preset=node&file=src/App.vue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants