I want to be able to control this component with the keyboard alone as much as possible. I do this by making sure you are pointed to the proper control on a tab press. On the last form field when you press tab it adds the temporary item to the list, resets the temporary item, and focuses you back on the first line item field.
The problem is if I want to have 2 line items with the same account, the second time I try to select it by pressing the first letter of the account name (in this case 'c') it skips an option because it was previously selected. I would like the options to reset when the temporary item is cleared.
To recreate the issue I'm trying to describe:
Enter any number for amount
Hit tab
Hit c (it will go to "Car Insurance")
Hit tab to submit the line and start at amount again
Enter an amount
Hit tab
and now if you try pressing 'c' again "Car Insurance" is no longer the first option. It defaults to the next item in the list for some reason.
I do not get the same issue if I use standard and tags, only when I use the material equivalents.
Here is the relevant code https://stackblitz.com/edit/angular-tab8tm