@@ -33,7 +33,7 @@ export class ListItemAttachments extends React.Component<IListItemAttachmentsPro
33
33
34
34
this . state = {
35
35
file : null ,
36
- showDialog : false ,
36
+ hideDialog : true ,
37
37
dialogMessage : '' ,
38
38
attachments : [ ] ,
39
39
deleteAttachment : false ,
@@ -67,14 +67,14 @@ export class ListItemAttachments extends React.Component<IListItemAttachmentsPro
67
67
} ) ;
68
68
}
69
69
this . setState ( {
70
- showDialog : false ,
70
+ hideDialog : true ,
71
71
dialogMessage : '' ,
72
72
attachments : files
73
73
} ) ;
74
74
}
75
75
catch ( error ) {
76
76
this . setState ( {
77
- showDialog : true ,
77
+ hideDialog : true ,
78
78
dialogMessage : strings . ListItemAttachmentserrorLoadAttachments . replace ( '{0}' , error . message )
79
79
} ) ;
80
80
}
@@ -107,7 +107,7 @@ export class ListItemAttachments extends React.Component<IListItemAttachmentsPro
107
107
directionalHint = { DirectionalHint . rightCenter } >
108
108
109
109
< DocumentCard
110
- onClickHref = { `${ _file . ServerRelativeUrl } ?web=1` }
110
+ onClickHref = { `${ _file . ServerRelativeUrl } ?web=1` }
111
111
className = { styles . documentCard } >
112
112
< DocumentCardPreview previewImages = { [ this . previewImages [ i ] ] } />
113
113
< Label className = { styles . fileLabel } >
@@ -141,12 +141,18 @@ export class ListItemAttachments extends React.Component<IListItemAttachmentsPro
141
141
{
142
142
143
143
< Dialog
144
- isOpen = { this . state . showDialog }
144
+ hidden = { this . state . hideDialog }
145
145
type = { DialogType . normal }
146
146
onDismiss = { this . _closeDialog }
147
- title = { strings . ListItemAttachmentsdialogTitle }
148
- subText = { this . state . dialogMessage }
149
- isBlocking = { true } >
147
+ dialogContentProps = { {
148
+ type : DialogType . normal ,
149
+ title : strings . ListItemAttachmentsdialogTitle ,
150
+ subText : this . state . dialogMessage
151
+ } }
152
+ modalProps = { {
153
+ isBlocking : true ,
154
+ containerClassName : 'ms-dialogMainOverride'
155
+ } } >
150
156
< DialogFooter >
151
157
< div style = { { marginBottom : 7 } } >
152
158
{
@@ -172,7 +178,7 @@ export class ListItemAttachments extends React.Component<IListItemAttachmentsPro
172
178
e . preventDefault ( ) ;
173
179
174
180
this . setState ( {
175
- showDialog : false ,
181
+ hideDialog : true ,
176
182
dialogMessage : '' ,
177
183
file : null ,
178
184
deleteAttachment : false ,
@@ -189,7 +195,7 @@ export class ListItemAttachments extends React.Component<IListItemAttachmentsPro
189
195
// On _onDeleteAttachment
190
196
private _onDeleteAttachment ( _file : IListItemAttachmentFile ) {
191
197
this . setState ( {
192
- showDialog : true ,
198
+ hideDialog : false ,
193
199
deleteAttachment : true ,
194
200
file : _file ,
195
201
dialogMessage : strings . ListItemAttachmentsconfirmDelete . replace ( '{0}' , _file . FileName ) ,
@@ -210,7 +216,7 @@ export class ListItemAttachments extends React.Component<IListItemAttachmentsPro
210
216
. then ( ( ) => {
211
217
212
218
this . setState ( {
213
- showDialog : true ,
219
+ hideDialog : false ,
214
220
deleteAttachment : false ,
215
221
disableButton : false ,
216
222
file : null ,
@@ -221,7 +227,7 @@ export class ListItemAttachments extends React.Component<IListItemAttachmentsPro
221
227
. catch ( ( reason ) => {
222
228
223
229
this . setState ( {
224
- showDialog : true ,
230
+ hideDialog : false ,
225
231
file : null ,
226
232
deleteAttachment : false ,
227
233
dialogMessage : strings . ListItemAttachmentsfileDeleteError . replace ( '{0}' , _file . FileName ) . replace ( '{1}' , reason )
0 commit comments