diff --git a/frontend/libs/console/legacy-ce/src/lib/components/Common/DropdownButton/DropdownButton.tsx b/frontend/libs/console/legacy-ce/src/lib/components/Common/DropdownButton/DropdownButton.tsx index 4be15844ba4..548055e8329 100644 --- a/frontend/libs/console/legacy-ce/src/lib/components/Common/DropdownButton/DropdownButton.tsx +++ b/frontend/libs/console/legacy-ce/src/lib/components/Common/DropdownButton/DropdownButton.tsx @@ -1,7 +1,6 @@ import React from 'react'; import InputGroup from 'react-bootstrap/lib/InputGroup'; -import DropdownButton from 'react-bootstrap/lib/DropdownButton'; -import MenuItem from 'react-bootstrap/lib/MenuItem'; +import * as DropdownMenu from '@radix-ui/react-dropdown-menu'; type DropDownButtonProps = { title: string; @@ -24,6 +23,18 @@ type DropDownButtonProps = { inputStyle?: Record; }; +/* +Hello traveler of the old code. +This was originally made using react boostrap, but for some reason, react boostrap +stopped having the dropdown working. This was migrated 1:1 using radix ui +in order to have the old code still work. + +This is not to be used with newer code !!!!!!! + */ + +// because the previous code was doing some wierd things with non existing attributes +/* eslint-disable @typescript-eslint/ban-ts-comment */ + const DDButton: React.FC = props => { const { title, @@ -43,26 +54,61 @@ const DDButton: React.FC = props => { } = props; return ( - - {dropdownOptions.map((d, i) => ( - - {d.display_text} - - ))} - + + + + + + + + {dropdownOptions.map((d, i) => ( + + + + ))} + + + +