Skip to content

Commit

Permalink
add disabled prop to EuiComboBox option
Browse files Browse the repository at this point in the history
  • Loading branch information
nreese committed Apr 10, 2018
1 parent 1e41642 commit fd8d3ad
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions src-docs/src/views/combo_box/combo_box.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ export default class extends Component {
'data-test-subj': 'titanOption',
}, {
label: 'Enceladus',
disabled: true,
}, {
label: 'Mimas',
}, {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,8 @@
color: $euiColorPrimary;
background-color: $euiFocusBackgroundColor;
}
&:disabled {
color: $euiColorMediumShade;
cursor: not-allowed;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -54,6 +55,7 @@ export class EuiComboBoxOption extends Component {
onKeyDown={this.onKeyDown}
ref={optionRef}
tabIndex="-1"
disabled={disabled}
{...rest}
>
{children}
Expand Down

0 comments on commit fd8d3ad

Please sign in to comment.