diff --git a/src-docs/src/views/combo_box/combo_box.js b/src-docs/src/views/combo_box/combo_box.js index bd01a4bae0b..db4e89f720b 100644 --- a/src-docs/src/views/combo_box/combo_box.js +++ b/src-docs/src/views/combo_box/combo_box.js @@ -13,6 +13,7 @@ export default class extends Component { 'data-test-subj': 'titanOption', }, { label: 'Enceladus', + disabled: true, }, { label: 'Mimas', }, { diff --git a/src/components/combo_box/combo_box_options_list/_combo_box_option.scss b/src/components/combo_box/combo_box_options_list/_combo_box_option.scss index 7f37487eb80..6afefe9431a 100644 --- a/src/components/combo_box/combo_box_options_list/_combo_box_option.scss +++ b/src/components/combo_box/combo_box_options_list/_combo_box_option.scss @@ -16,4 +16,8 @@ color: $euiColorPrimary; background-color: $euiFocusBackgroundColor; } + &:disabled { + color: $euiColorMediumShade; + cursor: not-allowed; + } } diff --git a/src/components/combo_box/combo_box_options_list/combo_box_option.js b/src/components/combo_box/combo_box_options_list/combo_box_option.js index e3f9a77b568..e09d7219e1f 100644 --- a/src/components/combo_box/combo_box_options_list/combo_box_option.js +++ b/src/components/combo_box/combo_box_options_list/combo_box_option.js @@ -38,6 +38,7 @@ export class EuiComboBoxOption extends Component { option, // eslint-disable-line no-unused-vars onClick, // eslint-disable-line no-unused-vars onEnterKey, // eslint-disable-line no-unused-vars + disabled, ...rest } = this.props; @@ -54,6 +55,7 @@ export class EuiComboBoxOption extends Component { onKeyDown={this.onKeyDown} ref={optionRef} tabIndex="-1" + disabled={disabled} {...rest} > {children}