Skip to content

Commit 2204937

Browse files
committed
ignore
1 parent ec24292 commit 2204937

File tree

1 file changed

+5
-9
lines changed

1 file changed

+5
-9
lines changed

src/components/Select/Select.tsx

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
// @ts-ignore
21
import React, { useState, useRef, useEffect } from 'react';
32
import ReactSelect, {
43
components as ReactSelectComponents,
@@ -59,8 +58,10 @@ const Select: React.FC<SelectProps> = ({
5958
action: ActionMeta<Option>
6059
) => {
6160
if (!isControlled) {
61+
// @ts-ignore
6262
setInternalValue(newValue);
6363
}
64+
// @ts-ignore
6465
onChange?.(newValue, action);
6566
};
6667

@@ -75,14 +76,13 @@ const Select: React.FC<SelectProps> = ({
7576
loadOptions ? 'select-async' : ''
7677
} ${className || ''}`.trim();
7778

78-
const CustomValueContainer = ({ children, ...props }: ValueContainerProps<Option, boolean>) => {
79-
return (
79+
// eslint-disable-next-line no-shadow,react/no-unstable-nested-components
80+
const CustomValueContainer = ({ children, ...props }: ValueContainerProps<Option, boolean>) => (
8081
<ReactSelectComponents.ValueContainer {...props}>
8182
{children}
8283
{name && <input type="hidden" name={name} value={props.getValue()[0]?.value || ''} />}
8384
</ReactSelectComponents.ValueContainer>
8485
);
85-
};
8686

8787
return (
8888
<SelectComponent
@@ -97,6 +97,7 @@ const Select: React.FC<SelectProps> = ({
9797
{...props}
9898
components={{
9999
...ReactSelectComponents,
100+
// eslint-disable-next-line react/no-unstable-nested-components
100101
Input: (inputComponentProps: any) => (
101102
<ReactSelectComponents.Input
102103
{...inputComponentProps}
@@ -110,9 +111,4 @@ const Select: React.FC<SelectProps> = ({
110111
);
111112
};
112113

113-
// For testing purposes
114-
Select.Async = AsyncSelect;
115-
Select.AsyncCreatable = AsyncCreatableSelect;
116-
Select.Creatable = CreatableSelect;
117-
118114
export default Select;

0 commit comments

Comments
 (0)