DEV: apply new coding standards (#10592)

This commit is contained in:
Joffrey JAFFEUX
2020-09-04 13:42:47 +02:00
committed by GitHub
parent 80dfaeb0d2
commit 52672b9eab
1473 changed files with 9386 additions and 9958 deletions

View File

@@ -20,12 +20,12 @@ export default SelectKitComponent.extend({
closeOnChange: false,
autoInsertNoneItem: false,
headerComponent: "multi-select/multi-select-header",
filterComponent: "multi-select/multi-select-filter"
filterComponent: "multi-select/multi-select-filter",
},
search(filter) {
return this._super(filter).filter(
content => !makeArray(this.selectedContent).includes(content)
(content) => !makeArray(this.selectedContent).includes(content)
);
},
@@ -33,7 +33,7 @@ export default SelectKitComponent.extend({
this.clearErrors();
const newContent = this.selectedContent.filter(
content => this.getValue(item) !== this.getValue(content)
(content) => this.getValue(item) !== this.getValue(content)
);
this.selectKit.change(
@@ -81,15 +81,15 @@ export default SelectKitComponent.extend({
}
},
selectedContent: computed("value.[]", "content.[]", function() {
const value = makeArray(this.value).map(v =>
selectedContent: computed("value.[]", "content.[]", function () {
const value = makeArray(this.value).map((v) =>
this.selectKit.options.castInteger && this._isNumeric(v) ? Number(v) : v
);
if (value.length) {
let content = [];
value.forEach(v => {
value.forEach((v) => {
if (this.selectKit.valueProperty) {
const c = makeArray(this.content).findBy(
this.selectKit.valueProperty,
@@ -136,7 +136,7 @@ export default SelectKitComponent.extend({
const selected = this.element.querySelectorAll(
".select-kit-header .choice.select-kit-selected-name"
);
selected.forEach(s => s.classList.remove("is-highlighted"));
selected.forEach((s) => s.classList.remove("is-highlighted"));
}
return true;
@@ -153,11 +153,11 @@ export default SelectKitComponent.extend({
deprecated(
"The `values` property is deprecated for multi-select. Use `value` instead",
{
since: "v2.4.0"
since: "v2.4.0",
}
);
this.set("value", this.values);
}
}
},
});