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;
|
} = state;
|
||||||
const dictionary = this.dictionary;
|
const dictionary = this.dictionary;
|
||||||
|
|
||||||
|
const showPlaceholder = !values || values.length === 0;
|
||||||
|
|
||||||
let classes = cn(style.control, style.multi, { [style.open]: open }, { [style.focused]: focused });
|
let classes = cn(style.control, style.multi, { [style.open]: open }, { [style.focused]: focused });
|
||||||
if (props.containerClass && props.containerClass.length > 0) {
|
if (props.containerClass && props.containerClass.length > 0) {
|
||||||
classes += ' ' + props.containerClass;
|
classes += ' ' + props.containerClass;
|
||||||
@ -187,7 +189,7 @@ export class MultiSelect extends AbstractSelect<Props, State> {
|
|||||||
onInput={this.onSearchInput}
|
onInput={this.onSearchInput}
|
||||||
onKeyDown={this.onSearchKeyDown}
|
onKeyDown={this.onSearchKeyDown}
|
||||||
onFocus={this.onSearchFocus}
|
onFocus={this.onSearchFocus}
|
||||||
placeholder={placeholder}
|
placeholder={showPlaceholder ? placeholder : undefined}
|
||||||
/>
|
/>
|
||||||
<div
|
<div
|
||||||
className={cn(style.toggle)}
|
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