diff --git a/openmetadata-ui/src/main/resources/ui/src/components/Modals/RoleModal/AddRoleModal.tsx b/openmetadata-ui/src/main/resources/ui/src/components/Modals/RoleModal/AddRoleModal.tsx index 3b1df09b8fa..c3534014e60 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/Modals/RoleModal/AddRoleModal.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/components/Modals/RoleModal/AddRoleModal.tsx @@ -14,7 +14,7 @@ import { isNil } from 'lodash'; import { FormErrorData } from 'Models'; import React, { useRef, useState } from 'react'; -import Select, { MultiValue } from 'react-select'; +import Select from 'react-select'; import { Role } from '../../../generated/entity/teams/role'; import { errorMsg, getEntityName } from '../../../utils/CommonUtils'; import { Button } from '../../buttons/Button/Button'; @@ -63,10 +63,7 @@ const AddRoleModal = ({ }); }; - const handleOnChange = ( - value: MultiValue, - { action }: { action: string } - ) => { + const handleOnChange = (value: unknown, { action }: { action: string }) => { if (isNil(value) || action === 'clear') { setSelectedPolicies([]); } else { diff --git a/openmetadata-ui/src/main/resources/ui/src/components/Users/Users.component.tsx b/openmetadata-ui/src/main/resources/ui/src/components/Users/Users.component.tsx index af0b0ccedab..97bf1980dfa 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/Users/Users.component.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/components/Users/Users.component.tsx @@ -16,7 +16,7 @@ import { AxiosError, AxiosResponse } from 'axios'; import { isNil, toLower } from 'lodash'; import { observer } from 'mobx-react'; import React, { Fragment, RefObject, useEffect, useState } from 'react'; -import Select, { MultiValue } from 'react-select'; +import Select from 'react-select'; import AppState from '../../AppState'; import { getTeams } from '../../axiosAPIs/teamsAPI'; import { TERM_ADMIN, TERM_USER } from '../../constants/constants'; @@ -192,7 +192,7 @@ const Users = ({ }; const handleOnRolesChange = ( - value: MultiValue, + value: unknown, { action }: { action: string } ) => { if (isNil(value) || action === 'clear') { @@ -202,7 +202,7 @@ const Users = ({ } }; const handleOnTeamsChange = ( - value: MultiValue, + value: unknown, { action }: { action: string } ) => { if (isNil(value) || action === 'clear') { diff --git a/openmetadata-ui/src/main/resources/ui/src/components/common/react-select-component/ReactSelectMultiInput.tsx b/openmetadata-ui/src/main/resources/ui/src/components/common/react-select-component/ReactSelectMultiInput.tsx index c365ea61d9d..ba10483a15f 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/common/react-select-component/ReactSelectMultiInput.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/components/common/react-select-component/ReactSelectMultiInput.tsx @@ -13,7 +13,6 @@ import { isUndefined } from 'lodash'; import React, { KeyboardEventHandler, useState } from 'react'; -import { MultiValue } from 'react-select'; import CreatableSelect from 'react-select/creatable'; import { reactSelectCustomStyle } from './reactSelectCustomStyle'; @@ -53,7 +52,7 @@ const ReactSelectMultiInput = ({ setinputValue(input); }; - const handleChange = (newValue: MultiValue) => { + const handleChange = (newValue: unknown) => { const data = newValue as Option[]; setValues(data); getTagValue(data.map((v) => v.value));