mirror of
https://github.com/discourse/discourse.git
synced 2025-03-06 11:19:51 +00:00
FIX: TagDrop
uses currentCategory
now (#12786)
This commit is contained in:
parent
b9b4d2485b
commit
2dfa1a267e
@ -11,15 +11,11 @@ import { set } from "@ember/object";
|
|||||||
|
|
||||||
function initTags(context) {
|
function initTags(context) {
|
||||||
const categories = context.site.categoriesList;
|
const categories = context.site.categoriesList;
|
||||||
const parentCategory = categories.findBy("id", 2);
|
const category = categories.findBy("id", 2);
|
||||||
const childCategories = categories.filter(
|
|
||||||
(c) => c.parentCategory === parentCategory
|
|
||||||
);
|
|
||||||
|
|
||||||
// top_tags
|
// top_tags
|
||||||
context.setProperties({
|
context.setProperties({
|
||||||
firstCategory: parentCategory,
|
currentCategory: category,
|
||||||
secondCategory: childCategories.firstObject,
|
|
||||||
tagId: "jeff",
|
tagId: "jeff",
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -55,8 +51,7 @@ discourseModule(
|
|||||||
componentTest("default", {
|
componentTest("default", {
|
||||||
template: hbs`
|
template: hbs`
|
||||||
{{tag-drop
|
{{tag-drop
|
||||||
firstCategory=firstCategory
|
currentCategory=currentCategory
|
||||||
secondCategory=secondCategory
|
|
||||||
tagId=tagId
|
tagId=tagId
|
||||||
options=(hash
|
options=(hash
|
||||||
tagId=tagId
|
tagId=tagId
|
||||||
|
@ -115,8 +115,7 @@ export default ComboBoxComponent.extend(TagsMixin, {
|
|||||||
}),
|
}),
|
||||||
|
|
||||||
topTags: computed(
|
topTags: computed(
|
||||||
"firstCategory",
|
"currentCategory",
|
||||||
"secondCategory",
|
|
||||||
"site.category_top_tags.[]",
|
"site.category_top_tags.[]",
|
||||||
"site.top_tags.[]",
|
"site.top_tags.[]",
|
||||||
function () {
|
function () {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user