Web: Client: Opening the file immediately after creation
This commit is contained in:
parent
916eb0439c
commit
4e1415774d
@ -113,7 +113,10 @@ class FilesRowContent extends React.PureComponent {
|
||||
? createFolder(item.parentId, itemTitle)
|
||||
.then(() => this.completeAction(e)).finally(() => setIsLoading(false))
|
||||
: createFile(item.parentId, `${itemTitle}.${item.fileExst}`)
|
||||
.then(() => this.completeAction(e)).finally(() => setIsLoading(false))
|
||||
.then((file) => {
|
||||
window.open(file.webUrl, "_blank")
|
||||
this.completeAction(e)
|
||||
}).finally(() => setIsLoading(false))
|
||||
}
|
||||
|
||||
componentDidUpdate(prevProps) {
|
||||
|
@ -375,8 +375,9 @@ export function fetchTreeFolders(dispatch) {
|
||||
export function createFile(folderId, title) {
|
||||
return dispatch => {
|
||||
return files.createFile(folderId, title)
|
||||
.then(folder => {
|
||||
.then(file => {
|
||||
fetchFolder(folderId, dispatch);
|
||||
return Promise.resolve(file)
|
||||
});
|
||||
};
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user