The frist argument of useScroll can support dom selector
whateveryoudo opened this issue · comments
ykx commented
Clear and concise description of the problem
I find it not work when i use documentByxx
as the first argument, it works in onMounted, but I can't use the result in my template,I find use watch Api with flush: post
, maybe dom element not a reactive element, get null , In addition, a lot of components ref.value not the element, maybe $el, I think provide a function to get the elem or compatible other circumstances
Suggested solution
start listener in nexttick or use onmounted inside
Alternative
No response
Additional context
No response
Validations
- Follow our Code of Conduct
- Read the Contributing Guidelines.
- Read the docs.
- Check that there isn't already an issue that request the same feature to avoid creating a duplicate.