michael-s-molina commented on a change in pull request #17089:
URL: https://github.com/apache/superset/pull/17089#discussion_r734570809



##########
File path: superset-frontend/src/dashboard/actions/dashboardInfo.ts
##########
@@ -17,13 +17,32 @@
  * under the License.
  */
 import { Dispatch } from 'redux';
-import { makeApi } from '@superset-ui/core';
+import { makeApi, CategoricalColorNamespace } from '@superset-ui/core';
+import { isString } from 'lodash';
 import { ChartConfiguration, DashboardInfo } from '../reducers/types';
 
 export const DASHBOARD_INFO_UPDATED = 'DASHBOARD_INFO_UPDATED';
 
 // updates partially changed dashboard info
 export function dashboardInfoChanged(newInfo: { metadata: any }) {
+  const { metadata } = newInfo;
+  const { color_namespace: namespace, label_colors: labelColors } = metadata;
+
+  const categoricalNamespace = CategoricalColorNamespace.getNamespace(
+    namespace,
+  );
+
+  categoricalNamespace.resetColors();

Review comment:
       I noticed that in `superset-frontend/src/dashboard/actions/hydrate.js` 
you're not calling `resetColors` before setting the colors. Is it ok or do we 
need to change something?




-- 
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]

Reply via email to