From 1f1dfd42af0808c081cb55720556ee9a1acf2d4f Mon Sep 17 00:00:00 2001 From: Chirag Madlani <12962843+chirag-madlani@users.noreply.github.com> Date: Thu, 27 Jun 2024 17:03:01 +0530 Subject: [PATCH] fix(ui): fix duplicate options with selected option for teams (#16773) --- .../ui/src/pages/DataInsightPage/DataInsightProvider.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/openmetadata-ui/src/main/resources/ui/src/pages/DataInsightPage/DataInsightProvider.tsx b/openmetadata-ui/src/main/resources/ui/src/pages/DataInsightPage/DataInsightProvider.tsx index adba7e2b701..9c04fdb96df 100644 --- a/openmetadata-ui/src/main/resources/ui/src/pages/DataInsightPage/DataInsightProvider.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/pages/DataInsightPage/DataInsightProvider.tsx @@ -10,7 +10,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import { isEmpty, isEqual } from 'lodash'; +import { isEmpty, isEqual, uniqBy } from 'lodash'; import { DateRangeObject } from 'Models'; import React, { createContext, @@ -254,7 +254,7 @@ const DataInsightProvider = ({ children }: DataInsightProviderProps) => { data: kpiList, }, teamFilter: { - options: teamsOptions.options, + options: uniqBy(teamsOptions.options, 'id'), selectedKeys: teamsOptions.selectedOptions, onChange: handleTeamChange, onGetInitialOptions: fetchDefaultTeamOptions,