Skip to content

Commit

Permalink
Fixes EuiComboBox Label not calculated correctly (#3501)
Browse files Browse the repository at this point in the history
* Pass getSelectedOptionForSearchValue to EuiComboBox options list

* Updated snapshots

* Added cl

Co-authored-by: Greg Thompson <[email protected]>
  • Loading branch information
ashikmeerankutty and thompsongl authored May 27, 2020
1 parent 684bbee commit d1f0fc2
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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 `appendIconComponentCache` function to allow manual pre-emptive loading of source elements into the `EuiIcon` cache ([#3481](https://github.com/elastic/eui/pull/3481))
- 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))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 [
Expand Down Expand Up @@ -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 [
Expand Down
1 change: 1 addition & 0 deletions src/components/combo_box/combo_box.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -993,6 +993,7 @@ export class EuiComboBox<T> extends Component<
updatePosition={this.updatePosition}
width={width}
delimiter={delimiter}
getSelectedOptionForSearchValue={getSelectedOptionForSearchValue}
/>
</EuiPortal>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ export type EuiComboBoxOptionsListProps<T> = CommonProps &
getSelectedOptionForSearchValue?: (
searchValue: string,
selectedOptions: any[]
) => EuiComboBoxOptionOption<T>;
) => EuiComboBoxOptionOption<T> | undefined;
isLoading?: boolean;
listRef: RefCallback<HTMLDivElement>;
matchingOptions: Array<EuiComboBoxOptionOption<T>>;
Expand Down

0 comments on commit d1f0fc2

Please sign in to comment.