You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The select-box works besides this, but when I try to initially select an option based on a user that should be edited, it won't change to category the user has.
The text was updated successfully, but these errors were encountered:
The select box I have, won't change the selected option.
My first attempt was:
[selected]="category.value == user.userCategory.value""
but it doesn't work.
I tried removing the
<option value="" disabled selected>Choose your option</option>
toobut neither did it work.
<div class="input-field col s6"> <i class="material-icons prefix">perm_identity</i> <select [(ngModel)]="user.userCategory" name="userCategory" materialize="material_select" [materializeSelectOptions]="userCategories" required=""> <option value="" disabled selected>Choose your option</option> <option *ngFor="let category of userCategories" [value]="category.value" [selected]="category.value == user.userCategory.value">{{category.name}}</option> </select> <label>User category</label> </div>
Here seen as a picture:

The select-box works besides this, but when I try to initially select an option based on a user that should be edited, it won't change to category the user has.
The text was updated successfully, but these errors were encountered: