only show placeholder if there are no items selected. closes #5606
This commit is contained in:
parent
cb9c47af67
commit
92ca33cd74
@ -76,6 +76,8 @@ export class MultiSelect extends AbstractSelect<Props, State> {
|
||||
} = state;
|
||||
const dictionary = this.dictionary;
|
||||
|
||||
const showPlaceholder = !values || values.length === 0;
|
||||
|
||||
let classes = cn(style.control, style.multi, { [style.open]: open }, { [style.focused]: focused });
|
||||
if (props.containerClass && props.containerClass.length > 0) {
|
||||
classes += ' ' + props.containerClass;
|
||||
@ -187,7 +189,7 @@ export class MultiSelect extends AbstractSelect<Props, State> {
|
||||
onInput={this.onSearchInput}
|
||||
onKeyDown={this.onSearchKeyDown}
|
||||
onFocus={this.onSearchFocus}
|
||||
placeholder={placeholder}
|
||||
placeholder={showPlaceholder ? placeholder : undefined}
|
||||
/>
|
||||
<div
|
||||
className={cn(style.toggle)}
|
||||
|
4
dist/select25.js
vendored
4
dist/select25.js
vendored
File diff suppressed because one or more lines are too long
2
dist/select25.js.map
vendored
2
dist/select25.js.map
vendored
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user