mirror of
https://github.com/flarum/core.git
synced 2025-10-26 21:21:28 +01:00
Remove app.search instance, cache app.cache.searched (#2151)
* Moved search state logic into search state
This commit is contained in:
committed by
GitHub
parent
f4afb006ed
commit
4a804dbbbc
@@ -7,6 +7,7 @@ import SelectDropdown from '../../common/components/SelectDropdown';
|
||||
import NotificationsDropdown from './NotificationsDropdown';
|
||||
import ItemList from '../../common/utils/ItemList';
|
||||
import listItems from '../../common/helpers/listItems';
|
||||
import Search from '../components/Search';
|
||||
|
||||
/**
|
||||
* The `HeaderSecondary` component displays secondary header controls, such as
|
||||
@@ -33,7 +34,7 @@ export default class HeaderSecondary extends Component {
|
||||
items() {
|
||||
const items = new ItemList();
|
||||
|
||||
items.add('search', app.search.render(), 30);
|
||||
items.add('search', Search.component({ state: app.search }), 30);
|
||||
|
||||
if (app.forum.attribute('showLanguageSelector') && Object.keys(app.data.locales).length > 1) {
|
||||
const locales = [];
|
||||
|
||||
Reference in New Issue
Block a user