Skip to content

Commit

Permalink
Extended EuiFieldText in EuiSuggestInput (#4452)
Browse files Browse the repository at this point in the history
  • Loading branch information
K-Kumar-01 authored Jan 28, 2021
1 parent f3cdb28 commit 523a117
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 17 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

- Added `getDefaultEuiMarkdownProcessingPlugins` method for better control over `EuiMarkdownEditor`'s toolbar UI ([#4383](https://github.com/elastic/eui/pull/4383))
- Changed `EuiOutsideClickDetector` events to be standard event types ([#4434](https://github.com/elastic/eui/pull/4434))
- Added `EuiFieldTextProps` in type definitions for `EuiSuggestInput` ([#4452](https://github.com/elastic/eui/pull/4452))

**Bug fixes**

Expand Down
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

0 comments on commit 523a117

Please sign in to comment.