File tree Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -212,16 +212,17 @@ export class FileUploader implements ControlValueAccessor {
212212 }
213213
214214 onFilesAdded ( ) {
215+ const newFiles = new Set < FileItem > ( this . files ) ;
215216 if ( ! this . multiple ) {
216- this . files . clear ( ) ;
217+ newFiles . clear ( ) ;
217218 }
218219 for ( let file of this . fileList ) {
219220 const fileItem = this . createFileItem ( file ) ;
220- this . files . add ( fileItem ) ;
221+ newFiles . add ( fileItem ) ;
221222 }
222223
224+ this . value = newFiles ;
223225 this . filesChange . emit ( this . files ) ;
224- this . value = this . files ;
225226 }
226227
227228 onDragOver ( event ) {
Original file line number Diff line number Diff line change @@ -346,7 +346,7 @@ class ReactiveFormsStory implements OnInit {
346346 this . disabledFormGroup = this . formBuilder . group ( {
347347 files : new FormControl ( new Set < any > ( ) , [ Validators . required ] )
348348 } ) ;
349- this . disabledFormGroup . disable ( )
349+ this . disabledFormGroup . disable ( ) ;
350350 }
351351
352352 onUpload ( ) {
You can’t perform that action at this time.
0 commit comments