mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
DEV: Make lazy_load_categories setting use groups (#25282)
This allows certain users to test the new feature and avoid disruptions in other's workflows.
This commit is contained in:
@@ -29,7 +29,7 @@ export default ComboBoxComponent.extend({
|
||||
this._super(...arguments);
|
||||
|
||||
if (
|
||||
this.siteSettings.lazy_load_categories &&
|
||||
this.site.lazy_load_categories &&
|
||||
!Category.hasAsyncFoundAll([this.value])
|
||||
) {
|
||||
// eslint-disable-next-line no-console
|
||||
@@ -92,7 +92,7 @@ export default ComboBoxComponent.extend({
|
||||
},
|
||||
|
||||
search(filter) {
|
||||
if (this.siteSettings.lazy_load_categories) {
|
||||
if (this.site.lazy_load_categories) {
|
||||
return Category.asyncSearch(this._normalize(filter), {
|
||||
scopedCategoryId: this.selectKit.options?.scopedCategoryId,
|
||||
prioritizedCategoryId: this.selectKit.options?.prioritizedCategoryId,
|
||||
|
||||
@@ -135,7 +135,7 @@ export default ComboBoxComponent.extend({
|
||||
),
|
||||
|
||||
async search(filter) {
|
||||
if (this.siteSettings.lazy_load_categories) {
|
||||
if (this.site.lazy_load_categories) {
|
||||
const results = await Category.asyncSearch(filter, {
|
||||
parentCategoryId: this.options.parentCategory?.id || -1,
|
||||
includeUncategorized: this.siteSettings.allow_uncategorized_topics,
|
||||
|
||||
@@ -51,7 +51,7 @@ export default MultiSelectComponent.extend({
|
||||
},
|
||||
|
||||
async search(filter) {
|
||||
if (!this.siteSettings.lazy_load_categories) {
|
||||
if (!this.site.lazy_load_categories) {
|
||||
return this._super(filter);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user