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

Make Copy button revert on SavedResources panel #406

Open
acharliekelly opened this issue Oct 15, 2019 · 0 comments
Open

Make Copy button revert on SavedResources panel #406

acharliekelly opened this issue Oct 15, 2019 · 0 comments
Labels
enhancement New feature or request

Comments

@acharliekelly
Copy link
Collaborator

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.

@acharliekelly acharliekelly added the enhancement New feature or request label Oct 15, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant