mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-08-26 21:16:23 +02:00
feat: add new option to categorySearch module, defaultCategories, use to populate the category list when you don't want to poll backend for the main category list
This commit is contained in:
@@ -4,7 +4,7 @@ define('categorySearch', ['alerts', 'bootstrap', 'api'], function (alerts, boots
|
||||
const categorySearch = {};
|
||||
|
||||
categorySearch.init = function (el, options) {
|
||||
let categoriesList = null;
|
||||
let categoriesList = options.defaultCategories || null;
|
||||
options = options || {};
|
||||
options.privilege = options.privilege || 'topics:read';
|
||||
options.states = options.states || ['watching', 'tracking', 'notwatching', 'ignoring'];
|
||||
|
||||
Reference in New Issue
Block a user