Skip to content
This repository was archived by the owner on Feb 28, 2022. It is now read-only.
This repository was archived by the owner on Feb 28, 2022. It is now read-only.

Make Copy button revert on SavedResources panel #406

@acharliekelly

Description

@acharliekelly

As of PR #405, there is a Copy button on the Saved Resources panel. When you click the button, the map view URL (the same URL as would open if you clicked the Share button) is copied to the clipboard, the icon changes from a Copy icon to a Check icon, so the user knows something has happened.

Expected Behavior

However, if resources are added or removed, the icon on the button should revert back to the Copy icon. That is, when the Resource URL no longer matches what is saved to the clipboard, then the icon should switch back.

Current Behavior

Instead, the icon only changes the first time you click it, switching from Copy to Checkmark. It then remains Checkmark no matter what else happens.

Possible Solution

Need a state change on the SavedResources to cause an update for the Copy button. (Could also use a change of the URL to cause the button to update, since both events occur simultaneously.) Point is, we need to trigger a change on the button.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions