UNPKG

@awsui/components-react

Version:

AWS UI is a collection of [React](https://reactjs.org/) components that help create intuitive, responsive, and accessible user experiences for web applications. It is developed by Amazon Web Services (AWS). This work is available under the terms of the [A

37 lines (36 loc) 1.65 kB
import React from 'react'; import { BaseComponentProps } from '../internal/base-component'; import { CancelableEventHandler, NonCancelableEventHandler } from '../internal/events'; import { FormFieldValidationControlProps } from '../internal/context/form-field-context'; import { OptionDefinition } from '../internal/components/option/interfaces'; import { DropdownStatusProps } from '../internal/components/dropdown-status'; import { BaseInputProps } from '../input/internal'; import { InputProps } from '../input'; export interface AutosuggestProps extends BaseComponentProps, BaseInputProps, FormFieldValidationControlProps, DropdownStatusProps { options?: AutosuggestProps.Options; filteringType?: AutosuggestProps.FilteringType; enteredTextLabel: AutosuggestProps.EnteredTextLabel; onLoadItems?: NonCancelableEventHandler<AutosuggestProps.LoadItemsDetail>; empty?: React.ReactNode; virtualScroll?: boolean; onKeyDown?: CancelableEventHandler<InputProps.KeyDetail>; onKeyUp?: CancelableEventHandler<InputProps.KeyDetail>; } export declare namespace AutosuggestProps { type FilteringType = 'auto' | 'manual'; type Option = OptionDefinition; type Options = ReadonlyArray<Option | OptionGroup>; type AutosuggestItem = (Option | OptionGroup) & { type?: 'parent' | 'child' | 'use-entered'; }; type EnteredTextLabel = (value: string) => string; interface OptionGroup extends Option { label?: string; options: ReadonlyArray<Option>; } interface LoadItemsDetail { filteringText: string; firstPage: boolean; samePage: boolean; } }