Currently, I am experimenting with an Angular Mat-Select that allows multiple selections. To display the selected values in the value field, I have implemented a custom Mat-Select-Trigger. My goal is to enable automatic resizing of the value field (similar to a textarea cdkTextAreaAutoResize) and wrap the selected values into a new row when the content size exceeds the field's dimensions.
To illustrate what I mean, I have created a Stackblitz demo here:
https://stackblitz.com/edit/angular-ivy-u5yos6
In essence, I am looking for a solution where the placeholder for the selected values wraps the items and arranges them in a new row, automatically adjusting the size of the mat-select-trigger until all values are accommodated. I've attempted to use fxLayout and flexBox without success. Any guidance on this matter would be highly appreciated.