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

Is UseDraggable really using storage for initial value? #2527

Closed
7 tasks done
bergden-resonai opened this issue Dec 11, 2022 · 1 comment
Closed
7 tasks done

Is UseDraggable really using storage for initial value? #2527

bergden-resonai opened this issue Dec 11, 2022 · 1 comment

Comments

@bergden-resonai
Copy link

Describe the bug

I'm trying to follow the example here:

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.

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

System:
    OS: macOS 13.0.1
    CPU: (8) arm64 Apple M1
    Memory: 76.88 MB / 16.00 GB
    Shell: 3.2.57 - /bin/bash
  Binaries:
    Node: 18.8.0 - /opt/homebrew/bin/node
    Yarn: 1.22.19 - /opt/homebrew/bin/yarn
    npm: 8.3.1 - /usr/local/bin/npm
  Browsers:
    Chrome: 108.0.5359.98
    Firefox: 100.0
    Safari: 16.1

Used Package Manager

yarn

Validations

@wheatjs
Copy link
Member

wheatjs commented Jan 9, 2023

Fixed in #2575

@wheatjs wheatjs closed this as completed Jan 9, 2023
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

2 participants