Select2 Features

Hi
I have one requirement, inselect2 drop down list I have to show Name Age and id with ‘|’ separator but alignment issue coming ‘|’ symbol not coming in same line how to solve this.
Thanks in advance.

You can use a templateResult function to output whatever HTML you want in each item in the dropdown. For example, you could use your function to output something like:

<div class="select2-item">
  <span>${name}</span>
  <span>${age}</span>
  <span>${id}</span>
</div>

And then you would use CSS to cause these elements to align as you wish (such as by using flexbox). With clever use of borders and margins/padding on the <span>s you can simulate the vertical bar separator between the items (for example, add a left and right border on the second <span>).