Problem/Motivation
Bulma (the CSS framework) sets a fixed height on select elements that do not have the class is-multiple. This messes up auto-expansion to fit the items, including when using multiselect helpers like Select2 or TomSelect.
Steps to reproduce
Proposed resolution
Check if the field is multiselect and fix in templates/elements/select.html.twig if possible
Remaining tasks
| Comment | File | Size | Author |
|---|---|---|---|
| #9 | 3279293-9-after.png | 16.06 KB | shyam_bhatt |
| #9 | 3279293-9-before.png | 14.4 KB | shyam_bhatt |
Issue fork bulma-3279293
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
- 8.x-1.x
changes, plain diff MR !3
- 3279293-multi-select-form-elements
compare
- 2.0.x
changes, plain diff MR !2
Comments
Comment #2
mlncn commentedComment #3
mlncn commentedDoing this for 8.x-1.x-dev but should be cherry-picked for 2.0.x too i think.
Comment #7
mlncn commentedHappy to be a co-maintainer here also.
Comment #8
nedjoThx!
From the Bulma documentation it doesn't look like we need the is-multiple class on the select element, just on the wrapper.
For the wrapper, we could use
create_attribute()then conditionally add a class. Something like:That would be very welcome. Unfortunately I don't have the relevant permission to add maintainers.
Comment #9
shyam_bhattThe "MR !3" is working fine. Please check the below image.
Before:

After:

Comment #11
valictnx, committed
Comment #12
valic@mlncn added you as co-maintainer