mirror of
https://github.com/apache/superset.git
synced 2024-09-06 22:07:34 -04:00
fix(dashboard): label colors included in explore url (#16621)
This commit is contained in:
parent
7e09b7241e
commit
788c0c3dae
@ -371,8 +371,8 @@ export const hydrateDashboard = (dashboardData, chartData) => (
|
|||||||
// only persistent refreshFrequency will be saved to backend
|
// only persistent refreshFrequency will be saved to backend
|
||||||
shouldPersistRefreshFrequency: false,
|
shouldPersistRefreshFrequency: false,
|
||||||
css: dashboardData.css || '',
|
css: dashboardData.css || '',
|
||||||
colorNamespace: metadata?.color_namespace,
|
colorNamespace: metadata?.color_namespace || null,
|
||||||
colorScheme: metadata?.color_scheme,
|
colorScheme: metadata?.color_scheme || null,
|
||||||
editMode: canEdit && editMode,
|
editMode: canEdit && editMode,
|
||||||
isPublished: dashboardData.published,
|
isPublished: dashboardData.published,
|
||||||
hasUnsavedChanges: false,
|
hasUnsavedChanges: false,
|
||||||
|
@ -16,7 +16,6 @@
|
|||||||
* specific language governing permissions and limitations
|
* specific language governing permissions and limitations
|
||||||
* under the License.
|
* under the License.
|
||||||
*/
|
*/
|
||||||
import { isEqual } from 'lodash';
|
|
||||||
import {
|
import {
|
||||||
CategoricalColorNamespace,
|
CategoricalColorNamespace,
|
||||||
DataRecordFilters,
|
DataRecordFilters,
|
||||||
@ -71,9 +70,15 @@ export default function getFormDataWithExtraFilters({
|
|||||||
const cachedFormData = cachedFormdataByChart[sliceId];
|
const cachedFormData = cachedFormdataByChart[sliceId];
|
||||||
if (
|
if (
|
||||||
cachedFiltersByChart[sliceId] === filters &&
|
cachedFiltersByChart[sliceId] === filters &&
|
||||||
cachedFormData?.color_scheme === colorScheme &&
|
areObjectsEqual(cachedFormData?.color_scheme, colorScheme, {
|
||||||
cachedFormData?.color_namespace === colorNamespace &&
|
ignoreUndefined: true,
|
||||||
isEqual(cachedFormData?.label_colors, labelColors) &&
|
}) &&
|
||||||
|
areObjectsEqual(cachedFormData?.color_namespace, colorNamespace, {
|
||||||
|
ignoreUndefined: true,
|
||||||
|
}) &&
|
||||||
|
areObjectsEqual(cachedFormData?.label_colors, labelColors, {
|
||||||
|
ignoreUndefined: true,
|
||||||
|
}) &&
|
||||||
!!cachedFormData &&
|
!!cachedFormData &&
|
||||||
areObjectsEqual(cachedFormData?.dataMask, dataMask, {
|
areObjectsEqual(cachedFormData?.dataMask, dataMask, {
|
||||||
ignoreUndefined: true,
|
ignoreUndefined: true,
|
||||||
@ -110,7 +115,7 @@ export default function getFormDataWithExtraFilters({
|
|||||||
...extraData,
|
...extraData,
|
||||||
};
|
};
|
||||||
cachedFiltersByChart[sliceId] = filters;
|
cachedFiltersByChart[sliceId] = filters;
|
||||||
cachedFormdataByChart[sliceId] = formData;
|
cachedFormdataByChart[sliceId] = { ...formData, dataMask };
|
||||||
|
|
||||||
return formData;
|
return formData;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user