Get 2024 Templates Mega Bundle!14 Bootstrap, Vue & React Templates + 3 Vector Sets
Get for 99$

Select2 - Group - There are multiple vertical scrollbars


Hi,

https://preview.keenthemes.com/html/metronic/docs/forms/select2#group

There are 3 items in each group in the above example.
If I have more than 6 items (>= 7) in a group, a nested scrollbar will appear which cause a few difficulties for scrolling. Actually, ONLY ONE scrollbar is enought and perfect to scroll.sad

Could you take a look?

Thanksshocked


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 (4)


Hi,

Good spot. We just fixed this bug and the fix will be included in the next update Metronic v8.1.9.
You can apply this quick fix by changing the code in line 321 in src/sass/vendors/plugins/_select2.scss:


// Options
.select2-results > .select2-results__options {
max-height: 250px;
overflow-y: auto;
}


Then recompile your assets folder with Gulp or Webpack.

Please note that the build tools are required only in the development environment just to compile the assets when the source folder files are modified. In the hosting/server deployment, you will only need the compile assets, no need to install the build tools dependencies there.

Regards.


Your Support Matters!

We will highly appreciate your Metronic Review on Themeforest.
Please go to Themeforest Downloads page, select Metronic & leave your feedback.

I had same issue, tried to paste above scss code but vscode gives me error saying: } expected scss(css-rcurlyexpected)

Then just copied css code given below by Ahmet. It worked.
Thank you all!




<style>
ul.select2-results__options {
max-height: none!important;
overflow-y: unset!important;
}

ul.select2-results__options[role="listbox"] {
max-height: 250px!important;
overflow-y: auto!important;
}
</style>



Below Code is Work For Me.



ul.select2-results__options[role="group"] {
max-height: none !important;
overflow-y: unset !important;
}


<pre lang="scss">
.select2-container--bootstrap5 .select2-dropdown .select2-results__options[role="listbox"] {
max-height: 250px;
overflow-y: auto;
}<pre>


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