Reference Source
import GlobalSearchState from 'flarum/forum/states/GlobalSearchState'
public class | source

GlobalSearchState

Extends:

src/forum/states/SearchState.js~SearchState → GlobalSearchState

Constructor Summary

Public Constructor
public

Member Summary

Public Members
public

Method Summary

Public Methods
public

Redirect to the index page using the given sort parameter.

public

clear()

Clear the search input and the current controller's active search.

public

Redirect to the index page without a search filter.

public
public
public

getValue(): *

public
public

params(): *

Get parameters to be used in the current page.

public

stickyParams(): {"sort": *, "q": *}

Get URL parameters that stick between filter changes.

Public Constructors

public constructor() source

Public Members

public initialValueSet: boolean source

Public Methods

public changeSort(sort: undefined) source

Redirect to the index page using the given sort parameter.

Params:

NameTypeAttributeDescription
sort undefined

public clear() source

Clear the search input and the current controller's active search.

public clearInitialSearch() source

Redirect to the index page without a search filter. This is called when the 'x' is clicked in the search box in the header.

public currPageProvidesSearch(): * source

Return:

*

public getInitialSearch(): * source

Return:

*

public getValue(): * source

Return:

*

public intializeValue() source

public params(): * source

Get parameters to be used in the current page.

Return:

*

public stickyParams(): {"sort": *, "q": *} source

Get URL parameters that stick between filter changes.

This can be used to generate a link that clears filters.

Return:

{"sort": *, "q": *}