File tree Expand file tree Collapse file tree 1 file changed +8
-6
lines changed
src/controls/filePicker/UploadFilePickerTab Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -35,15 +35,17 @@ export default class UploadFilePickerTab extends React.Component<IUploadFilePick
35
35
accept = { acceptedFilesExtensions } multiple = { false } onChange = { ( event : React . ChangeEvent < HTMLInputElement > ) => this . _handleFileUpload ( event ) }
36
36
/>
37
37
{
38
- fileName &&
38
+ fileName && this . state . filePreview &&
39
39
/** Display image preview */
40
- < div className = { styles . localTabSinglePreview } >
41
- {
42
- this . state . filePreview &&
43
- < img className = { styles . localTabSinglePreviewImage } src = { this . state . filePreview } alt = { this . state . filePickerResult . fileName } />
44
- }
40
+ < div className = { styles . localTabSinglePreview } >
41
+ < img className = { styles . localTabSinglePreviewImage } src = { this . state . filePreview } alt = { this . state . filePickerResult . fileName } />
45
42
</ div >
46
43
}
44
+ < div >
45
+ < label className = { styles . localTabLabel } > {
46
+ ( ! this . state . filePreview ? fileName : "" )
47
+ } </ label >
48
+ </ div >
47
49
< label className = { styles . localTabLabel } htmlFor = "fileInput" > {
48
50
( fileName ? strings . ChangeFileLinkLabel : strings . ChooseFileLinkLabel )
49
51
} </ label >
You can’t perform that action at this time.
0 commit comments