'How to prevent antd multiselect from growing in height / how to customize multiselect label?

If I set the antd <Select/> maxTagTextLength to something tiny like 4 it works, but is there a way to make it show just 2+ items if more than one item is selected, so it always stays on one line? How do I customize the selected tag label so it just shows one label and shows something custom? I would like for these two inputs to have the same height when multiple items are selected. Ideally in the first input it would say "2 cities selected" and in the second, "2 values selected".

enter image description here



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source