mirror of
https://github.com/discourse/discourse.git
synced 2024-11-25 18:03:43 +08:00
FIX: Show Uncategorized in category-chooser (#25794)
The uncategorized category was not rendered correctly and it was also sometimes displayed twice. This commit is a similar bug fix to commit76647d3a34
and is a follow up to commit63a50b12fd
.
This commit is contained in:
parent
f4848ae989
commit
1df473b530
|
@ -17,7 +17,8 @@ export default ComboBoxComponent.extend({
|
|||
|
||||
selectKitOptions: {
|
||||
filterable: true,
|
||||
allowUncategorized: false,
|
||||
autoInsertNoneItem: false,
|
||||
allowUncategorized: "allowUncategorizedTopics",
|
||||
allowSubCategories: true,
|
||||
permissionType: PermissionType.FULL,
|
||||
excludeCategoryId: null,
|
||||
|
@ -54,10 +55,7 @@ export default ComboBoxComponent.extend({
|
|||
I18n.t(isString ? this.selectKit.options.none : "category.none")
|
||||
)
|
||||
);
|
||||
} else if (
|
||||
this.allowUncategorizedTopics ||
|
||||
this.selectKit.options.allowUncategorized
|
||||
) {
|
||||
} else if (this.selectKit.options.allowUncategorized) {
|
||||
return Category.findUncategorized();
|
||||
} else {
|
||||
const defaultCategoryId = parseInt(
|
||||
|
@ -94,6 +92,7 @@ export default ComboBoxComponent.extend({
|
|||
search(filter) {
|
||||
if (this.site.lazy_load_categories) {
|
||||
return Category.asyncSearch(this._normalize(filter), {
|
||||
includeUncategorized: this.allowUncategorizedTopics,
|
||||
scopedCategoryId: this.selectKit.options?.scopedCategoryId,
|
||||
prioritizedCategoryId: this.selectKit.options?.prioritizedCategoryId,
|
||||
});
|
||||
|
|
|
@ -24,6 +24,7 @@ export default ComboBoxComponent.extend({
|
|||
navigateToEdit: false,
|
||||
editingCategory: false,
|
||||
editingCategoryTab: null,
|
||||
allowUncategorizedTopics: setting("allow_uncategorized_topics"),
|
||||
|
||||
selectKitOptions: {
|
||||
filterable: true,
|
||||
|
@ -40,7 +41,7 @@ export default ComboBoxComponent.extend({
|
|||
displayCategoryDescription: "displayCategoryDescription",
|
||||
headerComponent: "category-drop/category-drop-header",
|
||||
parentCategory: false,
|
||||
allowUncategorized: setting("allow_uncategorized_topics"),
|
||||
allowUncategorized: "allowUncategorizedTopics",
|
||||
},
|
||||
|
||||
modifyComponentForRow() {
|
||||
|
|
Loading…
Reference in New Issue
Block a user