console component

This commit is contained in:
Shin'ya Ueoka 2017-10-01 09:59:34 +09:00
parent 749eea5ecf
commit 0c0a7efe70
3 changed files with 146 additions and 84 deletions

View file

@ -2,10 +2,14 @@ export default class Completion {
constructor(wrapper, store) {
this.wrapper = wrapper;
this.store = store;
this.prevState = {};
}
update() {
let state = this.store.getState();
if (JSON.stringify(this.prevState) === JSON.stringify(state)) {
return;
}
this.wrapper.innerHTML = '';
@ -24,6 +28,8 @@ export default class Completion {
}
}
}
this.prevState = state;
}
createCompletionTitle(text) {