diff --git a/CHANGELOG.md b/CHANGELOG.md index e2ce5f32c5d..4cbaa37b5b8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ and logic ([#390](https://github.com/elastic/eui/pull/390)) **Bug fixes** - Fixed `EuiContextMenu` bug when using the keyboard to navigate up, which was caused by unnecessarily re-rendering the items, thus losing references to them ([#431](https://github.com/elastic/eui/pull/431)) +- Fix error stemming from `selected` prop on `EuiSelect` ([#436](https://github.com/elastic/eui/pull/436)) # [`0.0.22`](https://github.com/elastic/eui/tree/v0.0.22) diff --git a/src-docs/src/views/form/form_rows.js b/src-docs/src/views/form/form_rows.js index 5df637b10f0..073585fd113 100644 --- a/src-docs/src/views/form/form_rows.js +++ b/src-docs/src/views/form/form_rows.js @@ -129,7 +129,7 @@ export default class extends Component { label="Select (with no initial selection)" > { const classes = classNames( @@ -31,10 +32,10 @@ export const EuiSelect = ({ className ); - let emtpyOptionNode; + let emptyOptionNode; if (hasNoInitialSelection) { - emtpyOptionNode = ( - + emptyOptionNode = ( + ); } @@ -51,9 +52,10 @@ export const EuiSelect = ({ name={name} className={classes} ref={inputRef} + defaultValue={defaultValue || ''} {...rest} > - {emtpyOptionNode} + {emptyOptionNode} {options.map((option, index) => { const { text,