IMSmobile / app

Arkivar – Mobile Client for Imagic IMS
MIT License
6 stars 6 forks source link

Keyword Selection throws setValue of undefined #570

Closed sandrozbinden closed 7 years ago

sandrozbinden commented 7 years ago

Steps to reproduce:

  1. Reload page
  2. Login and deconfigure all keyword upload fields
  3. go to upload page
  4. go back to entries
  5. configure a keyword upload field
  6. go to upload page
  7. try to select a keyword

Expected result: keyword field filled Actual result: Cannot read property 'setValue' of undefined at UploadPage.fillFormWithKeyword

-Login to client fresh client into police archvie -Upload an image -Go back to entries -Go into settings -Add both keywordfields to list of upload fields -Go back to entries -Acquire image -Try to add a single keyword error => Cannot read property 'setValue' of undefined

The problem is that in the method fillFormWithKeyword the fieldForm does not get updated (maybe has something to do with an event.

public fillFormWithKeyword(field: MetadataField, keyword: Keyword): void { this.fieldsForm.controls[field.name].setValue(keyword.keyword); }