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

Extended EuiFieldText in EuiSuggestInput #4452

Merged
merged 13 commits into from
Jan 28, 2021
35 changes: 18 additions & 17 deletions src/components/suggest/suggest_input.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,32 +21,33 @@
import React, { useState, FunctionComponent } from 'react';
import { CommonProps } from '../common';
import classNames from 'classnames';
import { EuiFieldText } from '../form';
import { EuiFieldText, EuiFieldTextProps } from '../form';
import { EuiToolTip } from '../tool_tip';
import { EuiIcon } from '../icon';
import { EuiInputPopover } from '../popover';
import { EuiSuggestItemProps } from './suggest_item';

export type EuiSuggestInputProps = CommonProps & {
tooltipContent?: string;
export type EuiSuggestInputProps = CommonProps &
EuiFieldTextProps & {
tooltipContent?: string;

/**
* Status of the current query 'unsaved', 'saved', 'unchanged' or 'loading'.
*/
status?: 'unsaved' | 'saved' | 'unchanged' | 'loading';
/**
* Status of the current query 'unsaved', 'saved', 'unchanged' or 'loading'.
*/
status?: 'unsaved' | 'saved' | 'unchanged' | 'loading';

/**
* Element to be appended to the input bar.
*/
append?: JSX.Element;
/**
* Element to be appended to the input bar.
*/
append?: JSX.Element;

/**
* List of suggestions to display using 'suggestItem'.
*/
suggestions: JSX.Element[] | EuiSuggestItemProps[];
/**
* List of suggestions to display using 'suggestItem'.
*/
suggestions: JSX.Element[] | EuiSuggestItemProps[];

sendValue?: Function;
};
sendValue?: Function;
};

interface Status {
icon?: string;
Expand Down