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

Select2 Overflow usage problem


Hi,
I'm Having A Problem With Select2 Overflow,
Where I Use Select2 I Have a Height Constraint


<style>
.select2-selection--multiple {
max-height: 100px;
overflow-y: auto;
}
</style>


I Fill Select2 Content with JS append
I Fill Only About 50 Data

<img src=" />

The Scroll Area Shows 23 Records Below It Does Not Show The Top Records, It's As If The Area Is Centered
How Can I Solve This Problem?


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,

Sorry for the late reply. Please try to use the below code to set a scrollable height to the multiple results container:


.select2-container--bootstrap5 .select2-selection--multiple .select2-selection__rendered {
max-height: 100px;
overflow-y: auto;
}


Regards



Hi,

Thanks for your feedback. Noted, we will check this further and get back to you as soon as possible. Could you please let us know your Metronic version ?

Regards.



Hi,
Metronic Theme 7 v8.1.1


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  :(