mirror of
https://github.com/discourse/discourse.git
synced 2025-01-06 08:53:43 +08:00
FIX: category-chooser search should be scoped to category (#7794)
This commit is contained in:
parent
0bcb62fc2d
commit
f2d5cde24c
|
@ -30,7 +30,7 @@ export default ComboBoxComponent.extend({
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.scopedCategoryId) {
|
if (this.scopedCategoryId) {
|
||||||
computedContent = this.categoriesByScope().map(c =>
|
computedContent = this.categoriesByScope(this.scopedCategoryId).map(c =>
|
||||||
this.computeContentItem(c)
|
this.computeContentItem(c)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -45,9 +45,9 @@ componentTest("with scopedCategoryId", {
|
||||||
assert.equal(this.subject.rowByIndex(1).value(), 26);
|
assert.equal(this.subject.rowByIndex(1).value(), 26);
|
||||||
assert.equal(this.subject.rows().length, 2);
|
assert.equal(this.subject.rows().length, 2);
|
||||||
|
|
||||||
await this.subject.fillInFilter("dev");
|
await this.subject.fillInFilter("spec");
|
||||||
|
|
||||||
assert.equal(this.subject.rows().length, 3);
|
assert.equal(this.subject.rows().length, 1);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user