@types/react-autosuggest
Advanced tools
Comparing version 10.1.5 to 10.1.6
@@ -36,3 +36,6 @@ // Type definitions for react-autosuggest 10.1 | ||
/** @internal */ | ||
type Omit<T, K extends keyof T> = Pick<T, ({ [P in keyof T]: P } & { [P in K]: never } & { [x: string]: never, [x: number]: never })[keyof T]>; | ||
type Omit<T, K extends keyof T> = Pick< | ||
T, | ||
({ [P in keyof T]: P } & { [P in K]: never } & { [x: string]: never; [x: number]: never })[keyof T] | ||
>; | ||
@@ -83,4 +86,3 @@ type FetchRequestedReasons = | ||
interface InputProps<TSuggestion> | ||
extends Omit<React.InputHTMLAttributes<HTMLElement>, 'onChange' | 'onBlur'> { | ||
interface InputProps<TSuggestion> extends Omit<React.InputHTMLAttributes<HTMLElement>, 'onChange' | 'onBlur'> { | ||
onChange: (event: React.FormEvent<HTMLElement>, params: ChangeEvent) => void; | ||
@@ -118,5 +120,3 @@ onBlur?: ((event: React.FocusEvent<HTMLElement>, params?: BlurEvent<TSuggestion>) => void) | undefined; | ||
type Theme = | ||
| Record<string, string | React.CSSProperties> | ||
| Partial<Record<ThemeKey, string | React.CSSProperties>>; | ||
type Theme = Record<string, string | React.CSSProperties> | Partial<Record<ThemeKey, string | React.CSSProperties>>; | ||
@@ -148,6 +148,4 @@ interface RenderSuggestionsContainerParams { | ||
type RenderSectionTitle = (section: any) => React.ReactNode; | ||
type RenderSuggestion<TSuggestion> = ( | ||
suggestion: TSuggestion, | ||
params: RenderSuggestionParams, | ||
) => React.ReactNode; | ||
type RenderSuggestion<TSuggestion> = (suggestion: TSuggestion, params: RenderSuggestionParams) => React.ReactNode; | ||
type ShouldKeepSuggestionsOnSelect<TSuggestion> = (suggestion?: TSuggestion) => boolean; | ||
type ShouldRenderSuggestions = (value: string, reason: ShouldRenderReasons) => boolean; | ||
@@ -213,2 +211,8 @@ | ||
/** | ||
* When a suggestion is selected, Autosuggest will consult this function on whether to close the suggestions list. | ||
* Use it, for example, if you want to make multiple selections at the same time. By default it will close every time | ||
* a suggestion is selected. | ||
*/ | ||
shouldKeepSuggestionsOnSelect?: ShouldKeepSuggestionsOnSelect<TSuggestion>; | ||
/** | ||
* When the input is focused, Autosuggest will consult this function when to render suggestions. | ||
@@ -254,3 +258,5 @@ * Use it, for example, if you want to display suggestions when input value is at least 2 characters long. | ||
type AutosuggestProps<TSuggestion, TSection> = AutosuggestPropsSingleSection<TSuggestion> | AutosuggestPropsMultiSection<TSuggestion, TSection>; | ||
type AutosuggestProps<TSuggestion, TSection> = | ||
| AutosuggestPropsSingleSection<TSuggestion> | ||
| AutosuggestPropsMultiSection<TSuggestion, TSection>; | ||
@@ -257,0 +263,0 @@ interface AutosuggestState<TSuggestion> { |
{ | ||
"name": "@types/react-autosuggest", | ||
"version": "10.1.5", | ||
"version": "10.1.6", | ||
"description": "TypeScript definitions for react-autosuggest", | ||
@@ -60,4 +60,4 @@ "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react-autosuggest", | ||
}, | ||
"typesPublisherContentHash": "e51c73c97ade2ed6523dc8e39008b226905f0ed611b92ac7efad1683b74d98ea", | ||
"typeScriptVersion": "3.6" | ||
"typesPublisherContentHash": "6b3c02b9269d7f97f1d5eeb80597be2f41cd20d24526a6c2671f2417dcea0708", | ||
"typeScriptVersion": "4.2" | ||
} |
@@ -11,3 +11,3 @@ # Installation | ||
### Additional Details | ||
* Last updated: Wed, 07 Jul 2021 17:02:53 GMT | ||
* Last updated: Wed, 18 Jan 2023 18:32:47 GMT | ||
* Dependencies: [@types/react](https://npmjs.com/package/@types/react) | ||
@@ -14,0 +14,0 @@ * Global values: none |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
14391
240