mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-11-01 02:56:10 +00:00
Fix issue-4513 UI: Fix error for main branch (#4522)
This commit is contained in:
parent
5ccd8ddbbf
commit
b1dd2a3905
@ -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<unknown>,
|
||||
{ action }: { action: string }
|
||||
) => {
|
||||
const handleOnChange = (value: unknown, { action }: { action: string }) => {
|
||||
if (isNil(value) || action === 'clear') {
|
||||
setSelectedPolicies([]);
|
||||
} else {
|
||||
|
||||
@ -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<unknown>,
|
||||
value: unknown,
|
||||
{ action }: { action: string }
|
||||
) => {
|
||||
if (isNil(value) || action === 'clear') {
|
||||
@ -202,7 +202,7 @@ const Users = ({
|
||||
}
|
||||
};
|
||||
const handleOnTeamsChange = (
|
||||
value: MultiValue<unknown>,
|
||||
value: unknown,
|
||||
{ action }: { action: string }
|
||||
) => {
|
||||
if (isNil(value) || action === 'clear') {
|
||||
|
||||
@ -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<unknown>) => {
|
||||
const handleChange = (newValue: unknown) => {
|
||||
const data = newValue as Option[];
|
||||
setValues(data);
|
||||
getTagValue(data.map((v) => v.value));
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user