示例#1
0
 private async Task HandleFieldChanged(FormFieldChangedEventArgs e)
 {
     if (e.IsEmptyFile(nameof(DragDropOptions.Files)))
     {
         Error = null;
         Model.ClearFiles();
         if (DragDropAreaRef != null)
         {
             await DragDropAreaRef.DeleteFileListAsync();
         }
         StateHasChanged();
     }
 }
示例#2
0
 private async Task HandleFieldChanged(FormFieldChangedEventArgs e)
 {
     if (LogLevel > ConsoleLogLevel.None)
     {
         Console.WriteLine($"Field value changed: FieldName={e.Field.FieldName} ; FieldId={e.FieldId} Value={e.Value} ; IsFile={e.IsFile}");
     }
     if (e.IsEmptyFile(nameof(RegisterUserModel.Photo)))
     {
         if (DragDropAreaRef != null)
         {
             await DragDropAreaRef.DeleteFileListAsync();
         }
         StateHasChanged();
     }
 }