From 10ad62e60698c5d53ffcf58ae6abd182f7d3fc9c Mon Sep 17 00:00:00 2001 From: Shin'ya Ueoka Date: Fri, 6 Oct 2017 23:03:28 +0900 Subject: console command actions without store --- src/components/console.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/components/console.js') diff --git a/src/components/console.js b/src/components/console.js index 25b135c..177cfe5 100644 --- a/src/components/console.js +++ b/src/components/console.js @@ -36,7 +36,7 @@ export default class ConsoleComponent { return browser.runtime.sendMessage({ type: messages.CONSOLE_ENTERED, text: e.target.value - }); + }).then(this.onBlur); case KeyboardEvent.DOM_VK_TAB: if (e.shiftKey) { this.store.dispatch(completionActions.selectPrev()); @@ -63,8 +63,10 @@ export default class ConsoleComponent { this.prevValue = e.target.value; return browser.runtime.sendMessage({ - type: messages.CONSOLE_CHANGEED, + type: messages.CONSOLE_QUERY_COMPLETIONS, text: e.target.value + }).then((completions) => { + this.store.dispatch(completionActions.setItems(completions)); }); } -- cgit v1.2.3