funkensturm / ember-local-storage

The addon provides a storageFor computed property that returns a proxy and persists the changes to localStorage or sessionStorage. It ships with an ember-data adapter.
https://www.funkensturm.com/ember-local-storage/
MIT License
218 stars 76 forks source link

#219 breaks importData #233

Closed jlblcc closed 7 years ago

jlblcc commented 7 years ago

PR #219 breaks the importData function. The localstorage index is not updated until a browser refresh due to _indices on the adapter being set as a computed property(_indices does not reflect the current localstorage state). You can reproduce this by running the demo locally and trying to import a file like this my-data.txt. Changing _indices back to a POJO fixes the issue, but will cause problems with tests as noted in the PR.

fsmanuel commented 7 years ago

@jlblcc oh that is sad! @bendemboski do you have any idea how we tackle that?

bendemboski commented 7 years ago

Whoops! #234 fixes the issue.

jlblcc commented 7 years ago

Can we get #234 merged and a patched version released? I'd like to use some of the features from master, but this is blocking. Thanks!

fsmanuel commented 7 years ago

@jlblcc sorry for the delay. I'll release today!

fsmanuel commented 7 years ago

@jlblcc how are you using the import/export? Via store or adapter? I think about deprecating the use via adapter...

fsmanuel commented 7 years ago

@jlblcc published 1.3.6

jlblcc commented 7 years ago

@fsmanuel I'm using import/export via store(this.store.importData). So no worries re: adapter deprecation.

Thanks for the release (and the addon)!