console component
This commit is contained in:
parent
749eea5ecf
commit
0c0a7efe70
3 changed files with 146 additions and 84 deletions
|
@ -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) {
|
||||
|
|
Reference in a new issue