From e40ff3ada6191bf520f7c811ccb60852da84f934 Mon Sep 17 00:00:00 2001 From: Geido <60598000+geido@users.noreply.github.com> Date: Mon, 27 Sep 2021 17:27:14 +0300 Subject: [PATCH] chore: Select component refactoring - DndColumnSelectControl - Iteration 5 (#16440) * Refactor Select * Update ariaLabel * Reconcile with latest Select changes * Fix lint * Enhance labels --- .../ColumnSelectPopover.tsx | 69 +++++++------------ 1 file changed, 24 insertions(+), 45 deletions(-) diff --git a/superset-frontend/src/explore/components/controls/DndColumnSelectControl/ColumnSelectPopover.tsx b/superset-frontend/src/explore/components/controls/DndColumnSelectControl/ColumnSelectPopover.tsx index c58b3d382e..bfffe94b2a 100644 --- a/superset-frontend/src/explore/components/controls/DndColumnSelectControl/ColumnSelectPopover.tsx +++ b/superset-frontend/src/explore/components/controls/DndColumnSelectControl/ColumnSelectPopover.tsx @@ -20,7 +20,7 @@ import React, { useCallback, useMemo, useState } from 'react'; import Tabs from 'src/components/Tabs'; import Button from 'src/components/Button'; -import { NativeSelect as Select } from 'src/components/Select'; +import { Select } from 'src/components'; import { t, styled } from '@superset-ui/core'; import { Form, FormItem } from 'src/components/Form'; @@ -126,17 +126,8 @@ const ColumnSelectPopover = ({ selectedCalculatedColumn?.column_name !== initialCalculatedColumn?.column_name || selectedSimpleColumn?.column_name !== initialSimpleColumn?.column_name; - - const filterOption = useCallback( - (input, option) => - option?.filterBy.toLowerCase().indexOf(input.toLowerCase()) >= 0, - [], - ); - - const getPopupContainer = useCallback( - (triggerNode: any) => triggerNode.parentNode, - [], - ); + const savedExpressionsLabel = t('Saved expressions'); + const simpleColumnsLabel = t('Column'); return (