u
This commit is contained in:
@@ -1,12 +1,13 @@
|
||||
/**
|
||||
* @file articleSearchAutomat.js
|
||||
* @description In-memory article search state for the `/artikel` overview and
|
||||
* search pages, querying against the cached `articleIndexAutomat`.
|
||||
* search pages, querying against the derived `articleIndexAutomat`.
|
||||
*
|
||||
* Upstream Triggers:
|
||||
* - UI / Search input: Components call `actions.search(query)` or `actions.reset()`.
|
||||
* - Reads data from `articleIndexAutomat`: Ensures the cached index is loaded
|
||||
* before filtering.
|
||||
* - Reads data from `articleIndexAutomat`: Ensures the derived index is available
|
||||
* before filtering. The index is built from the loaded category views, so a
|
||||
* search never issues a request of its own.
|
||||
*/
|
||||
|
||||
import { Automat } from 'react-automat';
|
||||
@@ -61,8 +62,8 @@ const actions = {
|
||||
/**
|
||||
* Runs a client-side search over the article index.
|
||||
*
|
||||
* The full index is already cached by `articleIndexAutomat`, so this does not
|
||||
* hit the network once the index has loaded.
|
||||
* The index is already derived from the cached category views, so this does
|
||||
* not hit the network once the tree has loaded.
|
||||
*
|
||||
* @param {string} target Search term; an empty string returns everything.
|
||||
* @returns {Promise<ArticleSearchResult>} Search outcome.
|
||||
|
||||
Reference in New Issue
Block a user