@@ -19,6 +19,10 @@ const isElementCaseOrStudy = (objectType: ElementType) => {
1919 return objectType === ElementType . STUDY || objectType === ElementType . CASE ;
2020} ;
2121
22+ const creating = ( elementUuid , childrenMetadata ) => {
23+ return ! childrenMetadata [ elementUuid ] || ( childrenMetadata [ elementUuid ] . type == 'STUDY' && ! childrenMetadata [ elementUuid ] . specificMetadata . caseFormat )
24+ }
25+
2226const getDisplayedElementName = (
2327 data : ElementAttributes ,
2428 childrenMetadata : Record < UUID , ElementAttributes > ,
@@ -29,7 +33,7 @@ const getDisplayedElementName = (
2933 if ( uploading ) {
3034 return elementName + '\n' + formatMessage ( { id : 'uploading' } ) ;
3135 }
32- if ( ! childrenMetadata [ elementUuid ] ) {
36+ if ( creating ( elementUuid , childrenMetadata ) ) {
3337 return elementName + '\n' + formatMessage ( { id : 'creationInProgress' } ) ;
3438 }
3539 return childrenMetadata [ elementUuid ] . elementName ;
@@ -72,11 +76,11 @@ export const NameCellRenderer = ({
7276 return (
7377 < Box sx = { styles . tableCell } >
7478 { /* Icon */ }
75- { ! childrenMetadata [ data . elementUuid ] &&
79+ { creating ( data . elementUuid , childrenMetadata ) &&
7680 isElementCaseOrStudy ( data . type ) && (
7781 < CircularProgress size = { 18 } sx = { styles . circularRoot } />
7882 ) }
79- { childrenMetadata [ data . elementUuid ] &&
83+ { ! creating ( data . elementUuid , childrenMetadata ) &&
8084 getFileIcon ( data . type , styles . icon ) }
8185 { /* Name */ }
8286 < OverflowableText
0 commit comments