mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-08 15:05:46 +01:00
accessing search route with no term auto-expands the form now, part 1 of 2, #2757
This commit is contained in:
@@ -31,7 +31,8 @@ searchController.search = function(req, res, next) {
|
|||||||
users: [],
|
users: [],
|
||||||
tags: [],
|
tags: [],
|
||||||
categories: categories,
|
categories: categories,
|
||||||
breadcrumbs: breadcrumbs
|
breadcrumbs: breadcrumbs,
|
||||||
|
expandSearch: true
|
||||||
};
|
};
|
||||||
plugins.fireHook('filter:search.build', {data: {}, results: results}, function(err, data) {
|
plugins.fireHook('filter:search.build', {data: {}, results: results}, function(err, data) {
|
||||||
if (err) {
|
if (err) {
|
||||||
@@ -75,6 +76,7 @@ searchController.search = function(req, res, next) {
|
|||||||
results.showAsTopics = req.query.showAs === 'topics';
|
results.showAsTopics = req.query.showAs === 'topics';
|
||||||
results.breadcrumbs = breadcrumbs;
|
results.breadcrumbs = breadcrumbs;
|
||||||
results.categories = categories;
|
results.categories = categories;
|
||||||
|
results.expandSearch = false;
|
||||||
|
|
||||||
plugins.fireHook('filter:search.build', {data: data, results: results}, function(err, data) {
|
plugins.fireHook('filter:search.build', {data: data, results: results}, function(err, data) {
|
||||||
if (err) {
|
if (err) {
|
||||||
|
|||||||
Reference in New Issue
Block a user