Skip to content

Commit

Permalink
Revert "Re-focus EuiSuperSelect input after making a value change (el…
Browse files Browse the repository at this point in the history
…astic#3734)"

This reverts commit c6e6e4f.
  • Loading branch information
anishagg17 authored Jul 20, 2020
1 parent 22cc5d5 commit 23569ed
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 15 deletions.
1 change: 0 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
- Fixed a bug in `EuiResizableContainer` preventing nested containers ([#3699](https://github.com/elastic/eui/pull/3699))
- Fixed a bug in `EuiResizableContainer` preventing resizing by arrow keys in some cases ([#3699](https://github.com/elastic/eui/pull/3699))
- Fixed `EuiHorizontalSteps` rendering over `EuiHeader` ([#3707](https://github.com/elastic/eui/pull/3707))
- Fixed bug where `EuiSuperSelect` lost focus after a value selection ([#3734](https://github.com/elastic/eui/pull/3734))

**Breaking changes**

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -710,7 +710,6 @@ exports[`EuiColorPalettePicker more props are propagated to each option 2`] = `
value="paletteFixed"
/>
}
buttonRef={[Function]}
className="euiSuperSelect"
closePopover={[Function]}
display="block"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -558,7 +558,6 @@ exports[`EuiSuperSelect props more props are propogated to each option 2`] = `
value="1"
/>
}
buttonRef={[Function]}
className="euiSuperSelect"
closePopover={[Function]}
display="block"
Expand Down
12 changes: 0 additions & 12 deletions src/components/form/super_select/super_select.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -101,14 +101,6 @@ export class EuiSuperSelect<T extends string> extends Component<

private itemNodes: Array<HTMLButtonElement | null> = [];
private popoverRef: HTMLDivElement | null = null;
private buttonRef: HTMLElement | null = null;
private setButtonRef = (popoverButtonRef: HTMLDivElement | null) => {
if (popoverButtonRef) {
this.buttonRef = popoverButtonRef.querySelector('button')!;
} else {
this.buttonRef = null;
}
};
private _isMounted: boolean = false;

state = {
Expand Down Expand Up @@ -186,9 +178,6 @@ export class EuiSuperSelect<T extends string> extends Component<
if (this.props.onChange) {
this.props.onChange(value);
}
if (this.buttonRef) {
this.buttonRef.focus();
}
};

onSelectKeyDown = (event: React.KeyboardEvent<HTMLButtonElement>) => {
Expand Down Expand Up @@ -350,7 +339,6 @@ export class EuiSuperSelect<T extends string> extends Component<
anchorPosition="downCenter"
ownFocus={false}
popoverRef={this.setPopoverRef}
buttonRef={this.setButtonRef}
hasArrow={false}
buffer={0}>
<EuiScreenReaderOnly>
Expand Down

0 comments on commit 23569ed

Please sign in to comment.