Adding code to transformProps that changes data gets rendered each chart change
See original GitHub issueThis is more of a code quality suggestion for the future / FYI as opposed to a bug that’s currently affecting users. I mentioned this in this PR, transformProps
gets run every time the chart or chart controls changes. It seems like transformProps
might not be a great place to alter the data because it gets executed before the user has clicked run, so it could change the chart automatically when a control changes in ways that we might not expect.
As an example, in big number when you clear a metric, instead of showing the overlay, we’ll show NaN before the user has clicked RUN because the data gets processed in transformProps so data returned to the chart will be null until the user selects a new metric.
I talked with @kristw about this in person, just wanted to leave this here to give others an FYI of what we found out. Not sure who to tag.
Superset version
master
Issue Analytics
- State:
- Created 5 years ago
- Comments:9 (8 by maintainers)
Top GitHub Comments
Yes, indeed it is a bug for this particular workflow 1) users change metric, and the query or dismiss dialog will be shown automaticall 2) users click
dismiss
, but the value for metric is still the modified value. 3) users change some instant control.In my opinion, to prevent this issue happen, when users click
dismiss
, the value of the modified control should be also undoed. Otherwise, the chart will be inconsistent with the control panel.What do you think?
@michellethomas @mistercrunch @williaster @kristw
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.