Super Sale Limited Time 50% OFF for All-Access Plans
Save 50% Now

Select2 multiple multiline


Hello, i am tryng to create a select2 multi select field:


<select class="form-select form-select-solid" multiple="multiple" data-kt-select2="true"
data-close-on-select="false" data-placeholder="Sin filtro aplicado" data-allow-clear="true" data-dropdown-parent="#kt_responses_filter_modal">
{% for key, value in diseases.items %}
<option value="{{ value }}">{{ key }}</option>
{% endfor %}
</select>


The problem that i am having is that when i choose multiple options and the width is not enough to show it all, it displays ... insted of putting it in a new line. Is there any way to change this behavior?

Thanks


Text formatting options
Submit
Click any option to insert into your comment. Select text first to wrap it.
  • **text** to make things bold
  • *text* to emphasize
  • ### Heading to make headings
  • [link text](url) for links
  • ![alt text](image-url) to paste in an image
  • - item to make a list
  • 1. item to make an ordered list
  • > quote to quote somebody
  • `code` for single line of code
  • ```js ... ``` for JS code block
  • ```html ... ``` for HTML code block
  • ```scss ... ``` for SCSS code block
  • ```php ... ``` for PHP code block
  • --- for a horizontal rule
  • happy  :)
  • shocked  :|
  • sad  :(

Replies (3)


Hi, thank you for the answer I am so sorry for bothering it seems to be the fault of one of the browser extensions that i have installed.



Hi happy,

No problem, all the best with your project!

Regards,
Sean



Hi,

We have tested this case and it seems working good in latest Metronic v8.2.9:
https://preview.keenthemes.com/html/metronic/docs/forms/select2#multiple-selection

Please check how it looks:
https://i.imgur.com/zpmEiuR.png

May I know your Metronic version, demo and build method(gulp/webpack) ?

Regards,
Sean


Text formatting options
Submit
Click any option to insert into your comment. Select text first to wrap it.
  • **text** to make things bold
  • *text* to emphasize
  • ### Heading to make headings
  • [link text](url) for links
  • ![alt text](image-url) to paste in an image
  • - item to make a list
  • 1. item to make an ordered list
  • > quote to quote somebody
  • `code` for single line of code
  • ```js ... ``` for JS code block
  • ```html ... ``` for HTML code block
  • ```scss ... ``` for SCSS code block
  • ```php ... ``` for PHP code block
  • --- for a horizontal rule
  • happy  :)
  • shocked  :|
  • sad  :(
Text formatting options
Submit
Click any option to insert into your comment. Select text first to wrap it.
  • **text** to make things bold
  • *text* to emphasize
  • ### Heading to make headings
  • [link text](url) for links
  • ![alt text](image-url) to paste in an image
  • - item to make a list
  • 1. item to make an ordered list
  • > quote to quote somebody
  • `code` for single line of code
  • ```js ... ``` for JS code block
  • ```html ... ``` for HTML code block
  • ```scss ... ``` for SCSS code block
  • ```php ... ``` for PHP code block
  • --- for a horizontal rule
  • happy  :)
  • shocked  :|
  • sad  :(