Fix issue-4513 UI: Fix error for main branch (#4522)

This commit is contained in:
Shailesh Parmar 2022-04-27 23:18:44 +05:30 committed by GitHub
parent 5ccd8ddbbf
commit b1dd2a3905
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 10 deletions

View File

@ -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 {

View File

@ -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') {

View File

@ -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));