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

Vue - adding bigint to Key broke :key bindings #819

Open
2 tasks done
kouts opened this issue Aug 29, 2024 · 0 comments
Open
2 tasks done

Vue - adding bigint to Key broke :key bindings #819

kouts opened this issue Aug 29, 2024 · 0 comments

Comments

@kouts
Copy link
Contributor

kouts commented Aug 29, 2024

Describe the bug

The recent change to VirtualItem.Key breaks the :key bindings in v-for loops.

Example:

Image

Your minimal, reproducible example

https://github.com/tanstack/virtual/tree/main/examples/

Steps to reproduce

Setup a virtualizer that uses a key that's not the index e.g.

const rowVirtualizer = useVirtualizer(
  computed(() => {
    return {
      count: props.items.length,
      getScrollElement: () => virtualizerRef.value,
      getItemKey: (index) => props.items[index].id, // <--- id here is string 
      estimateSize: () => 64,
      overscan: 10,
      debug: false,
    };
  })
);

Expected behavior

As a user I expected the :key bindings to not break in Vue v-for loops.

How often does this bug happen?

Every time

Screenshots or Videos

No response

Platform

macOS, Linux

tanstack-virtual version

3.10.6

TypeScript version

5.5.4

Additional context

No response

Terms & Code of Conduct

  • I agree to follow this project's Code of Conduct
  • I understand that if my bug cannot be reliable reproduced in a debuggable environment, it will probably not be fixed and this issue may even be closed.
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

No branches or pull requests

1 participant