Drag and Drop Import (#95)
* Drag and drop files into collection first pass * Allow import of sub documents Fix up UI styles * Import Loading indicator * Drag onto document to import
This commit is contained in:
@@ -50,10 +50,14 @@ class DocumentsStore {
|
||||
const res = await client.post('/documents.info', { id });
|
||||
invariant(res && res.data, 'Document not available');
|
||||
const { data } = res;
|
||||
const document = new Document(data);
|
||||
|
||||
runInAction('DocumentsStore#fetch', () => {
|
||||
this.data.set(data.id, new Document(data));
|
||||
this.data.set(data.id, document);
|
||||
this.isLoaded = true;
|
||||
});
|
||||
|
||||
return document;
|
||||
} catch (e) {
|
||||
this.errors.add('Failed to load documents');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user