The visible manifestation of the problem was that immediately after group creation using the shortcut button on the user page, the drop-down selector would display the first group in the list, despite everything being correct internally.
All that was needed was to use [ngValue] instead of [value] to bind the group names in the <option> elements of the selector.
Indeed, according to the Angular documentation, the ngValue directive "is mainly used on [...] option elements, so that when the element is selected, the ngModel of that element (or its select parent element) is set to the bound value."
This has been by far the most time I've ever spent to fix a bug by changing just three characters.
@mboudet closes #444
The visible manifestation of the problem was that immediately after group creation using the shortcut button on the user page, the drop-down selector would display the first group in the list, despite everything being correct internally.
All that was needed was to use
[ngValue]
instead of[value]
to bind the group names in the<option>
elements of the selector. Indeed, according to the Angular documentation, thengValue
directive "is mainly used on [...] option elements, so that when the element is selected, the ngModel of that element (or its select parent element) is set to the bound value."This has been by far the most time I've ever spent to fix a bug by changing just three characters.