I want to whenever I have a , when I choose an option, add it at the end of the list, instead of placing it as its order...
You can check material's stackblitz: https://stackblitz.com/angular/jdgkdlbeldj?file=src%2Fapp%2Fselect-multiple-example.ts
If I have this list:
toppingList: string[] = ['Extra cheese', 'Mushroom', 'Onion', 'Pepperoni', 'Sausage', 'Tomato'];
And I select initially Mushroom and Pepperoni ->MyList = [Mushroom, Pepperoni].
If I add a new option, such as Onion, I would like to be having MyList as:
[Mushroom, Pepperoni, Onion]
, but I get it as [Mushroom, Onion, Pepperoni]
.
How can I do it?