diff --git a/src/components/Clusters/components/ContextChooser/ContextChooser.js b/src/components/Clusters/components/ContextChooser/ContextChooser.js index d530389efa..77d93fc051 100644 --- a/src/components/Clusters/components/ContextChooser/ContextChooser.js +++ b/src/components/Clusters/components/ContextChooser/ContextChooser.js @@ -1,7 +1,6 @@ -import React from 'react'; import { useTranslation } from 'react-i18next'; import { MessageStrip } from '@ui5/webcomponents-react'; -import { Select } from 'fundamental-react'; +import { Select, Option } from '@ui5/webcomponents-react'; import { ResourceForm } from 'shared/ResourceForm'; @@ -24,6 +23,11 @@ export function ContextChooser(params) { text: t('clusters.wizard.all-contexts'), }); + const onChange = (event, setValue) => { + const selectedContext = event.detail.selectedOption.value; + setValue(selectedContext); + }; + return ( ( )} /> {kubeconfig['current-context'] === '-all-' && ( diff --git a/src/components/Preferences/LanguageSettings.tsx b/src/components/Preferences/LanguageSettings.tsx index be95c523af..5d8cf545c6 100644 --- a/src/components/Preferences/LanguageSettings.tsx +++ b/src/components/Preferences/LanguageSettings.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { useTranslation } from 'react-i18next'; import { useSetRecoilState } from 'recoil'; import { Select, Option } from '@ui5/webcomponents-react'; diff --git a/src/resources/Pods/ContainersLogs.js b/src/resources/Pods/ContainersLogs.js index 924e6c7b1f..fe70f40907 100644 --- a/src/resources/Pods/ContainersLogs.js +++ b/src/resources/Pods/ContainersLogs.js @@ -1,7 +1,8 @@ -import React, { useState, useEffect, useRef } from 'react'; +import { useState, useEffect, useRef } from 'react'; import { saveAs } from 'file-saver'; import { Button, Label, Switch, Text } from '@ui5/webcomponents-react'; -import { Select, FormLabel } from 'fundamental-react'; +import { Select, Option } from '@ui5/webcomponents-react'; +import { FormLabel } from 'fundamental-react'; import { LogsLink } from 'shared/components/LogsLink/LogsLink'; import { useGetStream } from 'shared/hooks/BackendAPI/useGet'; import { useWindowTitle } from 'shared/hooks/useWindowTitle'; @@ -183,12 +184,15 @@ const ContainersLogs = ({ params }) => { {t('pods.labels.filter-timeframe')} diff --git a/src/resources/RoleBindings/SubjectForm.js b/src/resources/RoleBindings/SubjectForm.js index 552fd681b2..07ff8eec41 100644 --- a/src/resources/RoleBindings/SubjectForm.js +++ b/src/resources/RoleBindings/SubjectForm.js @@ -4,7 +4,7 @@ import { useTranslation } from 'react-i18next'; import { FormFieldset } from 'fundamental-react'; import { ResourceForm } from 'shared/ResourceForm'; import * as Inputs from 'shared/ResourceForm/inputs'; -import { Select } from 'shared/components/Select/Select'; +import { Select, Option } from '@ui5/webcomponents-react'; import { ServiceAccountRef } from 'shared/components/ResourceRef/ServiceAccountRef'; import { DEFAULT_APIGROUP, SUBJECT_KINDS } from './templates'; @@ -18,8 +18,8 @@ export function SingleSubjectForm({ }) { const { t } = useTranslation(); - const setKind = (_, selected) => { - subject.kind = selected.key; + const setKind = selected => { + subject.kind = selected; switch (subject.kind) { case 'Group': delete subject.namespace; @@ -55,6 +55,11 @@ export function SingleSubjectForm({ setSubjects([...subjects]); }; + const onChange = event => { + const selectedKind = event.detail.selectedOption.value; + setKind(selectedKind); + }; + return ( ( - + {SUBJECT_KINDS.map(kind => ( + + ))} + )} /> diff --git a/src/shared/components/Select/Select.js b/src/shared/components/Select/Select.js deleted file mode 100644 index fb953f094f..0000000000 --- a/src/shared/components/Select/Select.js +++ /dev/null @@ -1,17 +0,0 @@ -import React from 'react'; -import { Select as FdSelect } from 'fundamental-react'; - -export function Select({ fullWidth, ...props }) { - if (fullWidth) { - props.popoverProps = { - ...props.popoverProps, - className: `${props.popoverProps?.className} select--full-width`, - }; - } - - return ( -
- -
- ); -}