Skip to content

layoutOptions.storage.removeItem not called #180

@MitchLillie

Description

@MitchLillie

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions