Web: Files : Fixed open files after create
This commit is contained in:
parent
ee4348c705
commit
a9163c06be
@ -110,13 +110,17 @@ class FilesRowContent extends React.PureComponent {
|
||||
if (itemTitle.trim() === '')
|
||||
return this.completeAction(e);
|
||||
|
||||
let newTab = item.fileExst
|
||||
? window.open('about:blank', '_blank')
|
||||
: null;
|
||||
|
||||
!item.fileExst
|
||||
? createFolder(item.parentId, itemTitle)
|
||||
.then(() => this.completeAction(e)).finally(() => setIsLoading(false))
|
||||
: createFile(item.parentId, `${itemTitle}.${item.fileExst}`)
|
||||
.then((file) => {
|
||||
window.open(file.webUrl, "_blank")
|
||||
this.completeAction(e)
|
||||
newTab.location = file.webUrl;
|
||||
this.completeAction(e);
|
||||
}).finally(() => setIsLoading(false))
|
||||
}
|
||||
|
||||
@ -143,11 +147,10 @@ class FilesRowContent extends React.PureComponent {
|
||||
}
|
||||
|
||||
cancelUpdateItem = (e) => {
|
||||
//this.setState({ loading: false });
|
||||
this.completeAction(e);
|
||||
}
|
||||
|
||||
onClickUpdateItem = () => {
|
||||
onClickUpdateItem = (e) => {
|
||||
(this.props.fileAction.type === FileAction.Create)
|
||||
? this.createItem()
|
||||
: this.updateItem();
|
||||
|
Loading…
Reference in New Issue
Block a user