mirror of
https://github.com/discourse/discourse.git
synced 2025-05-31 16:38:48 +08:00
DEV: introduces prettier for es6 files
This commit is contained in:
@ -10,7 +10,8 @@ export default SelectKitHeaderComponent.extend({
|
||||
"values:data-value"
|
||||
],
|
||||
classNames: "multi-select-header",
|
||||
layoutName: "select-kit/templates/components/multi-select/multi-select-header",
|
||||
layoutName:
|
||||
"select-kit/templates/components/multi-select/multi-select-header",
|
||||
selectedNameComponent: Ember.computed.alias("options.selectedNameComponent"),
|
||||
|
||||
ariaLabel: Ember.computed.or("computedContent.ariaLabel", "title", "names"),
|
||||
@ -30,17 +31,21 @@ export default SelectKitHeaderComponent.extend({
|
||||
const width = this.$().outerWidth(false);
|
||||
const availableSpace = width - offset;
|
||||
const $choices = $filter.parent(".choices");
|
||||
const parentRightPadding = parseInt($choices.css("padding-right") , 10);
|
||||
const parentRightPadding = parseInt($choices.css("padding-right"), 10);
|
||||
$filter.width(availableSpace - parentRightPadding * 4);
|
||||
},
|
||||
|
||||
@computed("computedContent.selection.[]")
|
||||
names(selection) {
|
||||
return Ember.makeArray(selection).map(s => s.name).join(",");
|
||||
return Ember.makeArray(selection)
|
||||
.map(s => s.name)
|
||||
.join(",");
|
||||
},
|
||||
|
||||
@computed("computedContent.selection.[]")
|
||||
values(selection) {
|
||||
return Ember.makeArray(selection).map(s => s.value).join(",");
|
||||
return Ember.makeArray(selection)
|
||||
.map(s => s.value)
|
||||
.join(",");
|
||||
}
|
||||
});
|
||||
|
Reference in New Issue
Block a user