Skip to content

Commit

Permalink
Merge branch 'master' into alisonjoseph-patch-1
Browse files Browse the repository at this point in the history
  • Loading branch information
alisonjoseph authored Oct 23, 2019
2 parents d05d3c9 + 0efc5da commit 0a109ba
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,9 @@ export default class FilterableMultiSelect extends React.Component {
const helper = helperText ? (
<div className={helperClasses}>{helperText}</div>
) : null;
const inputClasses = cx(`${prefix}--text-input`, {
[`${prefix}--text-input--empty`]: !this.state.inputValue,
});
const input = (
<Selection
disabled={disabled}
Expand Down Expand Up @@ -343,11 +346,6 @@ export default class FilterableMultiSelect extends React.Component {
invalidText={invalidText}
isOpen={isOpen}
{...getRootProps({ refKey: 'innerRef' })}>
{invalid && (
<WarningFilled16
className={`${prefix}--list-box__invalid-icon`}
/>
)}
<ListBox.Field
id={id}
disabled={disabled}
Expand All @@ -362,7 +360,7 @@ export default class FilterableMultiSelect extends React.Component {
/>
)}
<input
className={`${prefix}--text-input`}
className={inputClasses}
aria-controls={`${id}__menu`}
aria-autocomplete="list"
ref={el => (this.inputNode = el)}
Expand All @@ -373,6 +371,11 @@ export default class FilterableMultiSelect extends React.Component {
onKeyDown: this.handleOnInputKeyDown,
})}
/>
{invalid && (
<WarningFilled16
className={`${prefix}--list-box__invalid-icon`}
/>
)}
{inputValue && isOpen && (
<ListBox.Selection
clearSelection={this.clearInputValue}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ exports[`MultiSelect.Filterable should render 1`] = `
aria-controls="test-filterable-multiselect__menu"
aria-expanded={false}
autoComplete="off"
className="bx--text-input"
className="bx--text-input bx--text-input--empty"
disabled={false}
id="test-filterable-multiselect"
onBlur={[Function]}
Expand Down

0 comments on commit 0a109ba

Please sign in to comment.