Get 2025 Templates Mega Bundle!$1000 worth of 19 Bootstrap HTML, Vue & React Templates + 3 Vector Sets for just $99
Get for 99$

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
Here's a how to add some HTML formatting to your comment:
  • <pre></pre> for JS codes block
  • <pre lang="html"></pre> for HTML code block
  • <pre lang="scss"></pre> for SCSS code block
  • <pre lang="php"></pre> for PHP code block
  • <code></code> for single line of code
  • <strong></strong> to make things bold
  • <em></em> to emphasize
  • <ul><li></li></ul>  to make list
  • <ol><li></li></ol>  to make ordered list
  • <h3></h3> to make headings
  • <a></a> for links
  • <img> to paste in an image
  • <blockquote></blockquote> to quote somebody
  • 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
Here's a how to add some HTML formatting to your comment:
  • <pre></pre> for JS codes block
  • <pre lang="html"></pre> for HTML code block
  • <pre lang="scss"></pre> for SCSS code block
  • <pre lang="php"></pre> for PHP code block
  • <code></code> for single line of code
  • <strong></strong> to make things bold
  • <em></em> to emphasize
  • <ul><li></li></ul>  to make list
  • <ol><li></li></ol>  to make ordered list
  • <h3></h3> to make headings
  • <a></a> for links
  • <img> to paste in an image
  • <blockquote></blockquote> to quote somebody
  • happy  :)
  • shocked  :|
  • sad  :(
Text formatting options
Submit
Here's a how to add some HTML formatting to your comment:
  • <pre></pre> for JS codes block
  • <pre lang="html"></pre> for HTML code block
  • <pre lang="scss"></pre> for SCSS code block
  • <pre lang="php"></pre> for PHP code block
  • <code></code> for single line of code
  • <strong></strong> to make things bold
  • <em></em> to emphasize
  • <ul><li></li></ul>  to make list
  • <ol><li></li></ol>  to make ordered list
  • <h3></h3> to make headings
  • <a></a> for links
  • <img> to paste in an image
  • <blockquote></blockquote> to quote somebody
  • happy  :)
  • shocked  :|
  • sad  :(