diff --git a/ui/app/mirrors/create/cdc/sortingkey.tsx b/ui/app/mirrors/create/cdc/sortingkey.tsx index 48e7be0398..d88dc2a7c9 100644 --- a/ui/app/mirrors/create/cdc/sortingkey.tsx +++ b/ui/app/mirrors/create/cdc/sortingkey.tsx @@ -18,7 +18,11 @@ import { Label } from '@/lib/Label'; import { RowWithCheckbox } from '@/lib/Layout'; import { ToastContainer } from 'react-toastify'; import 'react-toastify/dist/ReactToastify.css'; -import { engineOptionStyles } from './styles'; +import { + engineOptionStyles, + sortingKeyPillContainerStyle, + sortingKeyPillStyle, +} from './styles'; interface SortingKeysProps { columns: string[]; @@ -42,7 +46,7 @@ const SelectSortingKeys = ({ (col: string, action: 'add' | 'remove') => { setSortingKeysSelections((prev) => { if (action === 'add' && !prev.some((key) => key === col)) { - return [col, ...prev]; + return [...prev, col]; } else if (action === 'remove') { return prev.filter((prevCol) => prevCol !== col); } @@ -147,30 +151,10 @@ const SelectSortingKeys = ({ theme={SelectTheme} isClearable /> -
+
{sortingKeysSelections.map((col: string) => { return ( -
+

{col}