mirror of
https://github.com/discourse/discourse.git
synced 2024-11-26 14:23:39 +08:00
FIX: ensures selection is lookedup into async content (#7586)
This commit is contained in:
parent
631b16ef86
commit
c238f0d223
|
@ -198,12 +198,17 @@ export default SelectKitComponent.extend({
|
|||
return this._super() && !this.get("hasReachedMaximum");
|
||||
},
|
||||
|
||||
@computed("computedValues.[]", "computedContent.[]")
|
||||
selection(computedValues, computedContent) {
|
||||
@computed(
|
||||
"computedValues.[]",
|
||||
"computedContent.[]",
|
||||
"computedAsyncContent.[]"
|
||||
)
|
||||
selection(computedValues, computedContent, computedAsyncContent) {
|
||||
const selected = [];
|
||||
const content = this.isAsync ? computedAsyncContent : computedContent;
|
||||
|
||||
computedValues.forEach(v => {
|
||||
const value = computedContent.findBy("value", v);
|
||||
const value = content.findBy("value", v);
|
||||
if (value) selected.push(value);
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user