From 590db47923c94e21eb86d9b28c42566d582ad21d Mon Sep 17 00:00:00 2001 From: Ashik Meerankutty Date: Mon, 18 May 2020 23:38:05 +0530 Subject: [PATCH 1/3] Pass getSelectedOptionForSearchValue to EuiComboBox options list --- src/components/combo_box/combo_box.tsx | 1 + .../combo_box/combo_box_options_list/combo_box_options_list.tsx | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/components/combo_box/combo_box.tsx b/src/components/combo_box/combo_box.tsx index e58c2536e2e..96966b8698a 100644 --- a/src/components/combo_box/combo_box.tsx +++ b/src/components/combo_box/combo_box.tsx @@ -993,6 +993,7 @@ export class EuiComboBox extends Component< updatePosition={this.updatePosition} width={width} delimiter={delimiter} + getSelectedOptionForSearchValue={getSelectedOptionForSearchValue} /> ); diff --git a/src/components/combo_box/combo_box_options_list/combo_box_options_list.tsx b/src/components/combo_box/combo_box_options_list/combo_box_options_list.tsx index 62c9df1a3eb..1c30e3aa1a4 100644 --- a/src/components/combo_box/combo_box_options_list/combo_box_options_list.tsx +++ b/src/components/combo_box/combo_box_options_list/combo_box_options_list.tsx @@ -67,7 +67,7 @@ export type EuiComboBoxOptionsListProps = CommonProps & getSelectedOptionForSearchValue?: ( searchValue: string, selectedOptions: any[] - ) => EuiComboBoxOptionOption; + ) => EuiComboBoxOptionOption | undefined; isLoading?: boolean; listRef: RefCallback; matchingOptions: Array>; From e796a7c4dacf0f36b454b20cfc1f61a6b59a6a0d Mon Sep 17 00:00:00 2001 From: Ashik Meerankutty Date: Mon, 18 May 2020 23:39:28 +0530 Subject: [PATCH 2/3] Updated snapshots --- src/components/combo_box/__snapshots__/combo_box.test.tsx.snap | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/components/combo_box/__snapshots__/combo_box.test.tsx.snap b/src/components/combo_box/__snapshots__/combo_box.test.tsx.snap index 6d6cedcf6f5..b40969f0790 100644 --- a/src/components/combo_box/__snapshots__/combo_box.test.tsx.snap +++ b/src/components/combo_box/__snapshots__/combo_box.test.tsx.snap @@ -451,6 +451,7 @@ exports[`props singleSelection prepend and append is rendered 1`] = ` areAllOptionsSelected={false} data-test-subj="" fullWidth={false} + getSelectedOptionForSearchValue={[Function]} listRef={[Function]} matchingOptions={ Array [ @@ -584,6 +585,7 @@ exports[`props singleSelection selects existing option when opened 1`] = ` areAllOptionsSelected={false} data-test-subj="" fullWidth={false} + getSelectedOptionForSearchValue={[Function]} listRef={[Function]} matchingOptions={ Array [ From e42e3e69e0f870e169cd8d2cde7b7c458035a52d Mon Sep 17 00:00:00 2001 From: Ashik Meerankutty Date: Tue, 19 May 2020 00:05:20 +0530 Subject: [PATCH 3/3] Added cl --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index f8141e66e03..b65810b6a7d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,6 @@ ## [`master`](https://github.com/elastic/eui/tree/master) +- Passed `getSelectedOptionForSearchValue` to `EuiComboBoxOptionsList` as prop ([#3501](https://github.com/elastic/eui/pull/3501)) - Added `initialSelected` to `EuiTableSelectionType` properties to set initial selected checkboxes for `EuiBasicTable` ([#3418](https://github.com/elastic/eui/pull/3418)) - Added exports for `EuiSteps` and related components types ([#3471](https://github.com/elastic/eui/pull/3471)) - Added `displayName` to components using `React.forwardRef` ([#3451](https://github.com/elastic/eui/pull/3451))