Reference Source
import GlobalSearchState from 'flarum/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
public
public

params(): SearchParams

Get parameters to be used in the current page.

public

stickyParams(): SearchParams

Get URL parameters that stick between filter changes.

Public Constructors

public constructor() source

Public Members

public initialValueSet: boolean source

Public Methods

public changeSort(sort: string) source

Redirect to the index page using the given sort parameter.

Params:

NameTypeAttributeDescription
sort string

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(): boolean source

Return:

boolean

public getInitialSearch(): * source

Return:

*

public getValue(): string source

Return:

string

public intializeValue() source

public params(): SearchParams source

Get parameters to be used in the current page.

Return:

SearchParams

public stickyParams(): SearchParams source

Get URL parameters that stick between filter changes.

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

Return:

SearchParams