stephenLYZ commented on a change in pull request #17792:
URL: https://github.com/apache/superset/pull/17792#discussion_r810662727
##########
File path: superset-frontend/src/dashboard/actions/dashboardState.js
##########
@@ -474,6 +480,21 @@ export function addSliceToDashboard(id, component) {
if (selectedSlice && selectedSlice.viz_type === 'filter_box') {
dispatch(addFilter(id, component, selectedSlice.form_data));
}
+
+ setTimeout(() => {
Review comment:
Yes. In this case it is not only necessary to wait for the chart data
from the server, but the exact timing is after the chart transform props, after
the colon called. So I'm using `postTransformProps` to handle this (an api that
seems to be rarely used, please let me know if this makes sense). See the
video, I simulated a weak network environment, but the colors still updated
after adding the chart.
https://user-images.githubusercontent.com/11830681/154857051-d76764cb-95cf-4bfd-b2dc-233bc95d9db3.mov
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]