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

error when use ref in Vue component instance(should use unrefElement) #2160

Closed
7 tasks done
mymx2 opened this issue Sep 3, 2022 · 1 comment
Closed
7 tasks done
Labels
bug Something isn't working

Comments

@mymx2
Copy link
Contributor

mymx2 commented Sep 3, 2022

Describe the bug

error when use ref in Vue component instance. same error in
// 1. useElementSize
// 2. useVirtualList
// 3. useScrollLock
// 4. usePointerSwipe
// 5. useInfiniteScroll
// 6. useElementVisibility
// 7. useDraggable
fix: use unrefElement rather than resolveUnref
image

Reproduction

https://play.vueuse.org/#N4IgDghgxg1hDmBTAziAXAbVAOwgW0XRADcBXRAWgBNE8BLEAGhGQHtSAnKQtEU7MDHhMQNZFA50wAFzqtsRAGrkABABFadFQAoAFhAA2AMxV1sKgGIdE2KLoCUp5CogqaxRAdZgz8FaVkDOmkATxcDLwB3ZxD2FWlWFUjJaUQVAFVsOg8OZEMVZTSAGToAIw4ISRQVI1YOAtUAJhUAMhUAZhFOAyJdaWkwZDQAemH+QXgAOihWPGGyShp6YaDS4bMaAA9JvAArVABfRhx8HhAAAQXSZERh5H1rKhE2Tm4icaERMQkpWXkiADKD0QVAaiHSN38gWCdBQky6HB6vD6AyGow+Uxmc0u5Gut3ulRB5wAnJMAAzk9bYLY7fYgI4nAhEHGIPHDGbWZ7sLhnDFfFA-GRyBS8ADCrAiiCgf3MrBMKBu2Fk+UKKnFeDArGQMPkGWhshQCKRIBRgxGYwEQmms2GLLZHMQJPJlI2iG2e0OAF1mEY6AZDWhQABBMBgSYLdCgVIagwQVJEAA8VGyAB1zCp4JIqABeFMgAB+NSiFBmBgzEDAFAALHm0yoVGBY9xcyAZkqbNISx3EPVgrRkF32xxa+ndC3xNYbCP67UlS28PJWNOVAA+OsqBPiurJ3CpFTWIwt6SVJDSPMqWOlTwtgAa57QxEM5Bbm3PwzX6c3rG3ZjjaUv155gAmvej4GM+eYhG+H4JsMybECuzyCtIRB0BqdTSCowD7ogJgHDUHCzCoADkCzEWmaGahwmHYXiACy7A3Iw-g3AAov6BBKoodDaqUfrBGE+FGIReAkXaNzsnUiDkVk6HUWq34cDuf4EURxGTMMW5Kb+qThuQMlpm2yA0SomzMYJKjZixiAMXi2j2GmaajCoPaEfUkS6DY1k4SYZhgioWKatgHamNgxkQLYiCTCoeQEC5HBuaFTnDCoACM0V4uxtAdgCdAAF6IMlKiNBlNzcdRpCGCUxlFe0pWIACEgSgYRSsLARVVvVAAKrBmKkHAApEUiFdgzkAKz1QAktgvpZKkjWERERUAGz1VlnHSNxvH8aERUAOz1WoFTwPAEClP6RW+psaDefwB7rSFFTSJ59TPRFOFsAYHiZAejm2PIxnxCeiCYVZB7aNgpARA5-1hZhx4cKek3IFtZT+pZ1kPVxPFlDtITaAjp72PSzBacpukRoGIDRo2f6JvB66ztI86LsupTwC2QTwH0FBjWSZJuJUMBoFQQu8-zy5GP6mwtoWpbLqkmzM3m3BDsuYAto0bPbj2LaEfwNBUCOH71gmyCQOYivKyAVabAYeYrsA2FgaoBwHLB5sRSbG6e5bbrW8gomixwwtczzxL84LIdoN40ACeL554EeFBayAK62ZCTsXmdngqG7HsWzBcHZIhzATr8RA0LNiBdYRgzaMA64AQYN0AtIkjYPAjDri7iA3QAcqQeBXhw3fYAcxNuwcQA

System Info

Browsers:
    Edge: Spartan (44.22000.120.0), Chromium (104.0.1293.63)
  npmPackages:
    @vueuse/core: workspace:* => 9.1.1
    @vueuse/integrations: workspace:* => 9.1.1
    @vueuse/math: workspace:* => 9.1.1
    @vueuse/shared: workspace:* => 9.1.1
    vue: ^3.2.37 => 3.2.37

Used Package Manager

pnpm

Validations

@sxzz sxzz added the bug Something isn't working label Sep 4, 2022
@sxzz
Copy link
Member

sxzz commented Sep 4, 2022

Reproduced in useElementVisibility, could you please provide more cases about the functions you mentioned.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants