You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For component usage, additional props `storageKey` and `storageType` can be passed to the component and enable the persistence of the element position.
But with storage-type="local" (how can I see the legal values for this type other than session?)
I do see an entry created by the name I passed for storage-key with x,y same as the initial-value, but they're never updated, so upon refresh the element returns to the same place.
Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
Make sure this is a VueUse issue and not a framework-specific issue. For example, if it's a Vue SFC related bug, it should likely be reported to https://github.com/vuejs/core instead.
Check that this is a concrete bug. For Q&A open a GitHub Discussion.
Describe the bug
I'm trying to follow the example here:
vueuse/packages/core/useDraggable/index.md
Line 39 in cfcc295
But with
storage-type="local"
(how can I see the legal values for this type other thansession
?)I do see an entry created by the name I passed for
storage-key
with x,y same as theinitial-value
, but they're never updated, so upon refresh the element returns to the same place.Following is a video of the example in the documentation not working:
vuedraggable.mov.mp4
I can't find anything in the code to indicate this should work, but I also couldn't find how the localStorage entry is created to begin with...
Reproduction
https://stackblitz.com/edit/vitejs-vite-4ye5qc/?file=package.json,src%2FApp.vue
System Info
Used Package Manager
yarn
Validations
The text was updated successfully, but these errors were encountered: