Comment 0 for bug 1941764

Revision history for this message
Galen Charlton (gmc) wrote :

When starting from a Inspect Queue from a bib queue in the Angular MARC Import, operations like 'Import Selected Record' can fail. Specifically, after selecting a record and clicking the link, the import tab is displayed but without the relevant queue showing as selected. Attempting to complete the would fail with the following error message:

  ERROR TypeError: this.selectedQueue is undefined

I traced this back to an issue with the combobox component. The combobox for the queue is passed both entries and a startId, e.g.,

      <eg-combobox [entries]="formatEntries('activeQueues')"
      <eg-combobox
         id="queue-select"
         [startId]="startQueueId"

As it happens, entries gets set first, then startId... but the setter for entries expects that startId has a value in order to apply the default selection correctly. I observed that switching the order of the startId and entries attributes can fix the problem.

Unfortunately, we cannot count on that per (e.g.):

https://github.com/angular/angular/issues/40007
https://stackoverflow.com/questions/42358507/angular2-how-to-have-input-setters-called-in-certain-order

Consequently, while it may be worth doing a quick fix to change the order of the attributes and see if that works well known on supported browsers, it looks like we may need to write an ngOnChanges handler for combobox.

Evergreen 3.6+