diff --git a/src-docs/src/views/super_select/super_select_complex.js b/src-docs/src/views/super_select/super_select_complex.js index 13a195d8981..1ae570f1dad 100644 --- a/src-docs/src/views/super_select/super_select_complex.js +++ b/src-docs/src/views/super_select/super_select_complex.js @@ -42,7 +42,7 @@ export default () => { }, ]; - const [value, setValue] = useState('option_one'); + const [value, setValue] = useState(); const onChange = (value) => { setValue(value); @@ -52,6 +52,7 @@ export default () => { onChange(value)} itemLayoutAlign="top" hasDividers diff --git a/src-docs/src/views/super_select/super_select_example.js b/src-docs/src/views/super_select/super_select_example.js index 348108fd821..cd8e4cac02c 100644 --- a/src-docs/src/views/super_select/super_select_example.js +++ b/src-docs/src/views/super_select/super_select_example.js @@ -102,13 +102,21 @@ export const SuperSelectExample = { }, ], text: ( -

- Both inputDisplay and{' '} - dropdownDisplay accept React nodes. Therefore you - can pass some descriptions with each option to show in the dropdown. - If your options will most likely be multi-line, add the{' '} - hasDividers prop to show borders between options. -

+ <> +

+ Both inputDisplay and{' '} + dropdownDisplay accept React nodes. Therefore you + can pass some descriptions with each option to show in the dropdown. + If your options will most likely be multi-line, add the{' '} + hasDividers prop to show borders between options. +

+

+ A placeholder prop may also be passed that + accepts string as well as React nodes (to match your{' '} + inputDisplay if necessary). This placeholder will + only show when valueOfSelected is empty. +

+ ), props: {}, snippet: superSelectComplexSnippet, diff --git a/src/components/color_picker/color_palette_picker/__snapshots__/color_palette_picker.test.tsx.snap b/src/components/color_picker/color_palette_picker/__snapshots__/color_palette_picker.test.tsx.snap index 0e0ec084dc8..72858bcf8d2 100644 --- a/src/components/color_picker/color_palette_picker/__snapshots__/color_palette_picker.test.tsx.snap +++ b/src/components/color_picker/color_palette_picker/__snapshots__/color_palette_picker.test.tsx.snap @@ -18,12 +18,6 @@ exports[`EuiColorPalettePicker is rendered 1`] = `
- - Select an option: , is selected - +
+ + +
+
+ , +] +`; + exports[`EuiSuperSelectControl props value option is rendered 1`] = ` Array [ - - Select an option: Option #1, is selected - diff --git a/upcoming_changelogs/6630.md b/upcoming_changelogs/6630.md new file mode 100644 index 00000000000..d718a5e8933 --- /dev/null +++ b/upcoming_changelogs/6630.md @@ -0,0 +1 @@ +- Added new `placeholder` prop to `EuiSuperSelect`