mirror of
https://github.com/apache/superset.git
synced 2026-05-10 02:15:50 +00:00
feat: Adds the ECharts Histogram chart (#28652)
This commit is contained in:
committed by
GitHub
parent
bc9eab9902
commit
896fe854dc
@@ -31,7 +31,7 @@ import {
|
||||
useComponentDidMount,
|
||||
usePrevious,
|
||||
} from '@superset-ui/core';
|
||||
import { debounce, omit, pick } from 'lodash';
|
||||
import { debounce, isEqual, isObjectLike, omit, pick } from 'lodash';
|
||||
import { Resizable } from 're-resizable';
|
||||
import { usePluginContext } from 'src/components/DynamicPlugins';
|
||||
import { Global } from '@emotion/react';
|
||||
@@ -460,15 +460,21 @@ function ExploreViewContainer(props) {
|
||||
|
||||
const chartIsStale = useMemo(() => {
|
||||
if (lastQueriedControls) {
|
||||
const changedControlKeys = Object.keys(props.controls).filter(
|
||||
key =>
|
||||
typeof lastQueriedControls[key] !== 'undefined' &&
|
||||
!areObjectsEqual(
|
||||
props.controls[key].value,
|
||||
lastQueriedControls[key].value,
|
||||
{ ignoreFields: ['datasourceWarning'] },
|
||||
),
|
||||
);
|
||||
const { controls } = props;
|
||||
const changedControlKeys = Object.keys(controls).filter(key => {
|
||||
const lastControl = lastQueriedControls[key];
|
||||
if (typeof lastControl === 'undefined') {
|
||||
return false;
|
||||
}
|
||||
const { value: value1 } = controls[key];
|
||||
const { value: value2 } = lastControl;
|
||||
if (isObjectLike(value1) && isObjectLike(value2)) {
|
||||
return !areObjectsEqual(value1, value2, {
|
||||
ignoreFields: ['datasourceWarning'],
|
||||
});
|
||||
}
|
||||
return !isEqual(value1, value2);
|
||||
});
|
||||
|
||||
return changedControlKeys.some(
|
||||
key =>
|
||||
|
||||
Reference in New Issue
Block a user