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

layoutOptions.storage.removeItem not called #180

Open
MitchLillie opened this issue Aug 24, 2016 · 0 comments
Open

layoutOptions.storage.removeItem not called #180

MitchLillie opened this issue Aug 24, 2016 · 0 comments

Comments

@MitchLillie
Copy link

Current behavior:

  • Click 'x' to remove layout
  • removeLayout(layout) is called, then layoutStorage.remove(layout) is called
  • We delete this.states[layout.id]
  • layoutStorage.save() is called, then this.storage.setItem

Expected behavior:
After deleting the layout from states, I'd expect this.storage.removeItem() to be called, though I'm not really sure what the intended behavior of that method is other than to handle mismatched hashes.

Using anything other than localStorage, and storing layouts individually, it becomes a pain to detect when a layout was removed, since at present it calls this.storage.setItem as any other change would. Further, it doesn't seem that removeItem is ever realistically called when using dashboard-layouts.

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

1 participant