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

Admin: "New chart" button on chart editor page doesn't work as expected #3875

Open
sophiamersmann opened this issue Aug 15, 2024 · 0 comments
Labels
admin Issues that need to be solved in the grapher admin (mostly) bug needs triage viz

Comments

@sophiamersmann
Copy link
Member

Description

Clicking the "New chart" button on a chart editor page doesn't work as expected. It should open a new editor with a blank slate, but instead, the configuration for the current chart is carried over. Clicking the "New chart" button on the index page works fine.

Steps to reproduce

  1. Go to the admin
  2. Edit a chart
  3. Click on "New chart"

Screenshots

Screenshot 2024-08-15 at 14 41 37

Additional context

This is what's supposed to fix it, but it doesn't work anymore:

// This funny construction allows the "new chart" link to work by forcing an update
// even if the props don't change
UNSAFE_componentWillReceiveProps(): void {
setTimeout(() => this.refresh(), 0)
}

#3793 refactors the admin and gets rid of the fix since it doesn't seem to work

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
admin Issues that need to be solved in the grapher admin (mostly) bug needs triage viz
Projects
None yet
Development

No branches or pull requests

1 participant