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

Add scrollRef prop to Vue Virtualizer #379

Closed
inokawa opened this issue Feb 15, 2024 · 2 comments · Fixed by #393
Closed

Add scrollRef prop to Vue Virtualizer #379

inokawa opened this issue Feb 15, 2024 · 2 comments · Fixed by #393
Labels
good first issue Good for newcomers

Comments

@inokawa
Copy link
Owner

inokawa commented Feb 15, 2024

It's necessary for complex markup.
Just port React implementation.

@inokawa inokawa added the good first issue Good for newcomers label Feb 15, 2024
@inokawa inokawa changed the title Add scrollRef prop to Vue and Solid Virtualizer Add scrollRef like prop to Vue and Solid Virtualizer Feb 15, 2024
@inokawa inokawa changed the title Add scrollRef like prop to Vue and Solid Virtualizer Add scrollRef prop to Vue and Solid Virtualizer Feb 15, 2024
@inokawa inokawa changed the title Add scrollRef prop to Vue and Solid Virtualizer Add scrollRef prop to Vue Virtualizer Feb 21, 2024
@inokawa inokawa self-assigned this Feb 21, 2024
@inokawa inokawa removed their assignment Feb 21, 2024
@billouboq
Copy link

is scrollRef working on react ? did not found the implementation and was not being able to make it work with a list that has header before the actual list and scroll is done by some parent view

@inokawa
Copy link
Owner Author

inokawa commented Feb 22, 2024

@billouboq
React's implementation is here.

if (scrollRef) {
// parent's ref doesn't exist when useLayoutEffect is called
microtask(() => assignScrollableElement(scrollRef[refKey]!));
} else {
assignScrollableElement(containerRef[refKey]!.parentElement!);
}

I just tried to implement it for Vue in #393. However, it is not working correctly at the moment. I'm not an expert of Vue so maybe something is wrong. Maybe we have to implement it in a different way than React.

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

Successfully merging a pull request may close this issue.

2 participants