-1

my select option showed like this

and my current code

<select class="rule-partner-select form-control select2" name="partner_name" id="partner_name_1">
    <option value="" disabled selected>SelectPartner</option>
</select>

I assign options in select dynamically by ajax.

select2 code here

 $('.select2').select2();

but I want to show like this by select2

Abid
  • 19
  • 8
  • 1
    this: https://stackoverflow.com/questions/17259916/difference-between-overflow-wrap-and-word-break and this: https://css-tricks.com/almanac/properties/o/overflow-wrap/ and this: https://developer.mozilla.org/en-US/docs/Web/CSS/overflow-wrap and this: https://www.w3schools.com/cssref/css3_pr_word-wrap.asp https://www.w3schools.com/cssref/css3_pr_text-overflow.asp – Martin Dec 01 '20 at 18:24

1 Answers1

0

This has been resolved. Actually, I put a large word in the database !! "kkkkkkkkkkkkkkkkkkkkkkkkkk...." so the problem occurred. when I put some white space (real sentence) like "kkk kkkk kkkk kkkk kkkk kkkkk ", it fulfills my requirement automatically by select2.

thanks. Please don't put large words!! :)

Abid
  • 19
  • 8