mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
Allow placeholder to be configured for combo-box.
This commit is contained in:
@@ -24,8 +24,11 @@ export default SingleSelectComponent.extend({
|
||||
|
||||
@on("didReceiveAttrs")
|
||||
_setComboBoxOptions() {
|
||||
const placeholder = this.get('placeholder');
|
||||
|
||||
this.get("headerComponentOptions").setProperties({
|
||||
clearable: this.get("clearable"),
|
||||
placeholder: placeholder ? I18n.t(placeholder) : "",
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
@@ -7,5 +7,6 @@ export default SelectKitHeaderComponent.extend({
|
||||
clearable: Ember.computed.alias("options.clearable"),
|
||||
caretUpIcon: Ember.computed.alias("options.caretUpIcon"),
|
||||
caretDownIcon: Ember.computed.alias("options.caretDownIcon"),
|
||||
shouldDisplayClearableButton: Ember.computed.and("clearable", "computedContent.hasSelection")
|
||||
shouldDisplayClearableButton: Ember.computed.and("clearable", "computedContent.hasSelection"),
|
||||
placeholder: Ember.computed.alias("options.placeholder"),
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user