File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -877,6 +877,7 @@ const getSectionPostOptions = (newFile, sectionReferences) => {
877877 return
878878 }
879879
880+ setIsDisabled ( true )
880881 const reomovedFileId = [ ]
881882 const tempQueue = JSON . parse ( JSON . stringify ( deleteFileQueue ) )
882883 console . log ( tempQueue )
@@ -891,7 +892,6 @@ const getSectionPostOptions = (newFile, sectionReferences) => {
891892 }
892893 const respone_str = await api . batchDelete ( paths )
893894 const response = await respone_str . json ( )
894- console . log ( response )
895895 for ( const r of response ) {
896896 reomovedFileId . push ( r ?. content ?. id )
897897 }
@@ -901,10 +901,10 @@ const getSectionPostOptions = (newFile, sectionReferences) => {
901901 console . error ( e )
902902 }
903903
904- console . log ( reomovedFileId )
905904 const newReport = removeFileFromReport ( reomovedFileId )
906905 setDeleteFileQueue ( tempQueue )
907906 processNewReport ( newReport )
907+ setIsDisabled ( false )
908908
909909 }
910910
@@ -1213,7 +1213,7 @@ const getSectionPostOptions = (newFile, sectionReferences) => {
12131213 < button
12141214 className = 'btn btn-small btn-icon-left review-files-delete-button'
12151215 tabIndex = '0'
1216- disabled = { deleteFileQueue . length === 0 }
1216+ disabled = { deleteFileQueue . length === 0 || isDisabled }
12171217 onClick = { deleteSelectedFilesWrapper }
12181218 >
12191219 < DeleteIcon className = "icon-sm" />
You can’t perform that action at this time.
0 commit comments