mirror of
https://github.com/apache/superset.git
synced 2026-04-18 07:35:09 +00:00
chore(build): remove Lodash filter and noop usage in superset-frontend (#32341)
Signed-off-by: hainenber <dotronghai96@gmail.com>
This commit is contained in:
@@ -23,7 +23,6 @@
|
||||
import { memo, useCallback, useEffect, useRef, useState } from 'react';
|
||||
import { ScreenGridLayer } from '@deck.gl/aggregation-layers';
|
||||
import { JsonObject, JsonValue, QueryFormData, t } from '@superset-ui/core';
|
||||
import { noop } from 'lodash';
|
||||
import sandboxedEval from '../../utils/sandbox';
|
||||
import { commonLayerProps } from '../common';
|
||||
import TooltipRow from '../../TooltipRow';
|
||||
@@ -135,7 +134,7 @@ const DeckGLScreenGrid = (props: DeckGLScreenGridProps) => {
|
||||
}, []);
|
||||
|
||||
const getLayers = useCallback(() => {
|
||||
const layer = getLayer(props.formData, props.payload, noop, setTooltip);
|
||||
const layer = getLayer(props.formData, props.payload, () => {}, setTooltip);
|
||||
|
||||
return [layer];
|
||||
}, [props.formData, props.payload, setTooltip]);
|
||||
|
||||
@@ -26,7 +26,6 @@ import {
|
||||
getNumberFormatter,
|
||||
getTimeFormatter,
|
||||
} from '@superset-ui/core';
|
||||
import { noop } from 'lodash';
|
||||
|
||||
import {
|
||||
BaseTransformedProps,
|
||||
@@ -166,7 +165,7 @@ export const allEventHandlers = (
|
||||
setDataMask,
|
||||
emitCrossFilters,
|
||||
)
|
||||
: noop,
|
||||
: () => {},
|
||||
contextmenu: contextMenuEventHandler(
|
||||
groupby,
|
||||
onContextMenu,
|
||||
|
||||
@@ -18,7 +18,6 @@
|
||||
*/
|
||||
import { useEffect, useMemo, useState } from 'react';
|
||||
import { t } from '@superset-ui/core';
|
||||
import { filter } from 'lodash';
|
||||
import {
|
||||
useChartEditModal,
|
||||
useFavoriteStatus,
|
||||
@@ -76,7 +75,7 @@ function ChartTable({
|
||||
TableTab.Other,
|
||||
);
|
||||
|
||||
const filteredOtherTabData = filter(otherTabData, obj => 'viz_type' in obj);
|
||||
const filteredOtherTabData = otherTabData?.filter(obj => 'viz_type' in obj);
|
||||
|
||||
const {
|
||||
state: { loading, resourceCollection: charts, bulkSelectEnabled },
|
||||
|
||||
@@ -18,7 +18,6 @@
|
||||
*/
|
||||
import { useEffect, useMemo, useState } from 'react';
|
||||
import { SupersetClient, t } from '@superset-ui/core';
|
||||
import { filter } from 'lodash';
|
||||
import { useFavoriteStatus, useListViewResource } from 'src/views/CRUD/hooks';
|
||||
import { Dashboard, DashboardTableProps, TableTab } from 'src/views/CRUD/types';
|
||||
import handleResourceExport from 'src/utils/export';
|
||||
@@ -61,10 +60,7 @@ function DashboardTable({
|
||||
TableTab.Other,
|
||||
);
|
||||
|
||||
const filteredOtherTabData = filter(
|
||||
otherTabData,
|
||||
obj => !('viz_type' in obj),
|
||||
);
|
||||
const filteredOtherTabData = otherTabData.filter(obj => !('viz_type' in obj));
|
||||
|
||||
const {
|
||||
state: { loading, resourceCollection: dashboards },
|
||||
|
||||
Reference in New Issue
Block a user