Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

fabienwnklr
Copy link
Contributor

new 'size' option to set dropdown size, can be a number to displayed items, or a simple CSS height (px, rem, em, vh)

I also added two tests for value as number of items displayed and CSS value

Default value is false so nothing change

Open to improvement and patch

@eduardo-mior
Copy link

eduardo-mior commented Sep 23, 2022

Some time ago I needed this too.

I solved this with 1 line of CSS:

.my-selectize .selectize-dropdown-content {
     max-height: none !important;
}

or

.my-selectize .selectize-dropdown-content {
     max-height: 450px !important;
}

I particularly think that this kind of problem should be solved via CSS not JS.

@fabienwnklr
Copy link
Contributor Author

Yes for simple height it's easily doable with CSS,I implemented that CSS values be accepted for better customization and flexibility. But first improvement and first idea it's to set a count of visible value, like 5 items visible etc.

Let's see what owner think about that !

Copy link
Contributor

@risadams risadams left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Got a couple of questions here. Also Thanks for adding tests! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants