Search improves (#67)

* ESC should go back from search
using direct onKeyDown here as react-keydown does not trigger within an input

* Addressable search urls
This commit is contained in:
Tom Moor
2017-05-21 23:02:53 -07:00
committed by GitHub
parent 87adccb816
commit 3353eb913a
5 changed files with 55 additions and 21 deletions

View File

@ -5,7 +5,7 @@ import { client } from 'utils/ApiClient';
import type { Document } from 'types';
class SearchStore {
@observable documents: ?(Document[]);
@observable documents: Array<Document> = [];
@observable searchTerm: ?string = null;
@observable isFetching = false;
@ -28,7 +28,7 @@ class SearchStore {
console.error('Something went wrong');
}
} else {
this.documents = null;
this.documents = [];
}
this.isFetching = false;