diff options
author | Noah Loomans <noahloomans@gmail.com> | 2017-12-13 12:26:36 +0100 |
---|---|---|
committer | Noah Loomans <noahloomans@gmail.com> | 2017-12-13 12:26:36 +0100 |
commit | fe27a0819a60caaa69b059f0c86d95ab0c4084b7 (patch) | |
tree | 62bc3ce011b97c9a2e7d00819beaccf145cf1b58 /src/client/react/actions | |
parent | 41a01f056984dc74f47e0380e2fe28fa16a59ff7 (diff) |
Prepair changeSelectedResult
Diffstat (limited to 'src/client/react/actions')
-rw-r--r-- | src/client/react/actions/search.js | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/client/react/actions/search.js b/src/client/react/actions/search.js index 53993d3..1b6847d 100644 --- a/src/client/react/actions/search.js +++ b/src/client/react/actions/search.js @@ -1,10 +1,14 @@ -// eslint-disable-next-line import/prefer-default-export export const inputChange = typedValue => ({ type: 'SEARCH/INPUT_CHANGE', typedValue, }); -export const focusChange = hasFocus => ({ - type: 'SEARCH/FOCUS_CHANGE', - hasFocus, +/** + * Change the selected result. + * @param {+1/-1} relativeChange usually +1 or -1, the change relative to the + * current result. + */ +export const changeSelectedResult = relativeChange => ({ + type: 'SEARCH/CHANGE_SELECTED_RESULT', + relativeChange, }); |