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

SearchState

Direct Subclass:

GlobalSearchState

Constructor Summary

Public Constructor
public

Member Summary

Public Members
public
public

value: *

Method Summary

Public Methods
public

cache(query: *)

Mark that we have already searched for this query so that we don't have to ping the endpoint again.

public

clear()

Clear the search value.

public

getValue(): *

public

isCached(query: *): *

Check if this query has been searched before.

public

setValue(value: *)

Public Constructors

public constructor() source

Public Members

public cachedSearches: * source

public value: * source

Public Methods

public cache(query: *) source

Mark that we have already searched for this query so that we don't have to ping the endpoint again.

Params:

NameTypeAttributeDescription
query *

public clear() source

Clear the search value.

public getValue(): * source

Return:

*

public isCached(query: *): * source

Check if this query has been searched before.

Params:

NameTypeAttributeDescription
query *

Return:

*

public setValue(value: *) source

Params:

NameTypeAttributeDescription
value *