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:
@ -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;
|
||||
|
Reference in New Issue
Block a user