Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EuiComboBox prop docs added #3007

Merged
merged 17 commits into from
Mar 12, 2020
Merged
Changes from 13 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions src/components/combo_box/combo_box.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,24 +54,60 @@ interface _EuiComboBoxProps<T>
Omit<HTMLAttributes<HTMLDivElement>, 'onChange'>,
DrillProps<T> {
'data-test-subj'?: string;
/**
* Updates the list of options asynchronously
*/
async: boolean;
className?: string;
/**
* When `true` creates a shorter height input
*/
compressed: boolean;
/**
* When `true` expands to the entire width available
*/
fullWidth: boolean;
id?: string;
inputRef?: RefCallback<HTMLInputElement>;
/**
* Shows a button that quickly clears any input
*/
isClearable: boolean;
/**
* Disables the input
*/
isDisabled?: boolean;
isInvalid?: boolean;
/**
* Swaps the dropdown options for a loading spinner
*/
isLoading?: boolean;
/**
* Doesn't show the suggestions list/dropdown
*/
noSuggestions?: boolean;
onBlur?: FocusEventHandler<HTMLDivElement>;
/**
* Called every time the query in the combo box is parsed
*/
onChange?: (options: Array<EuiComboBoxOptionOption<T>>) => void;
onFocus?: FocusEventHandler<HTMLDivElement>;
onKeyDown?: KeyboardEventHandler<HTMLDivElement>;
/**
* Called every time the text query in the search box is parsed
*/
onSearchChange?: (searchValue: string, hasMatchingOptions?: boolean) => void;
/**
* Sets the placeholder of the input
*/
placeholder?: string;
/**
* Every option must be the same height and must be explicitly set if using a custom render
*/
rowHeight?: number;
anishagg17 marked this conversation as resolved.
Show resolved Hide resolved
/**
* When `true` only allows the user to select a single option. Set to `{ asPlainText: true }` to not render input selection as pills
*/
singleSelection: boolean | EuiComboBoxSingleSelectionShape;
}

Expand Down