add placeholder support for multiselect, closes #5569
This commit is contained in:
parent
af901bafaa
commit
54a388de15
@ -19,6 +19,7 @@ enum StoreKeys {
|
||||
interface BaseSelectOptions {
|
||||
containerStyle?: string;
|
||||
containerClass?: string;
|
||||
placeholder?: string;
|
||||
tabIndex?: number;
|
||||
valueContent?: DataItemRenderer;
|
||||
resultContent?: DataItemRenderer;
|
||||
@ -44,7 +45,6 @@ interface SingleSelectOptions extends BaseSelectOptions {
|
||||
label?: string;
|
||||
value: DataItem;
|
||||
allowClear?: boolean;
|
||||
placeholder?: string;
|
||||
}
|
||||
|
||||
const BASE_DEFAULT_OPTIONS = {
|
||||
@ -107,6 +107,7 @@ class MultiSelectWrapper extends Component<
|
||||
<MultiSelect
|
||||
containerClass={opts.containerClass}
|
||||
containerStyle={opts.containerStyle}
|
||||
placeholder={opts.placeholder}
|
||||
valuesLabel={opts.valuesLabel}
|
||||
comboboxLabel={opts.comboboxLabel}
|
||||
valueContent={opts.valueContent}
|
||||
|
@ -65,7 +65,7 @@ export class MultiSelect extends AbstractSelect<Props, State> {
|
||||
}
|
||||
|
||||
public render(props, state) {
|
||||
const { values, tabIndex, minimumCharacters, valuesLabel, comboboxLabel } = props;
|
||||
const { values, tabIndex, minimumCharacters, valuesLabel, comboboxLabel, placeholder } = props;
|
||||
const {
|
||||
open,
|
||||
loading,
|
||||
@ -186,6 +186,7 @@ export class MultiSelect extends AbstractSelect<Props, State> {
|
||||
onInput={this.onSearchInput}
|
||||
onKeyDown={this.onSearchKeyDown}
|
||||
onFocus={this.onSearchFocus}
|
||||
placeholder={placeholder}
|
||||
/>
|
||||
<div className={cn(style.toggle)} aria-hidden={true} tabIndex={-1} onClick={this.onToggleClick}>
|
||||
<Toggle height={20} width={20} />
|
||||
|
@ -115,6 +115,7 @@
|
||||
document.getElementById('countries1'), {
|
||||
valuesLabel: "Selected Countries",
|
||||
comboboxLabel: "Add Country",
|
||||
placeholder: "Add Country",
|
||||
minimumCharacters: 2,
|
||||
query: query,
|
||||
quiet: 100,
|
||||
|
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