multi-select icon indicating copy to clipboard operation
multi-select copied to clipboard

Change rows count

Open zhukovsergei opened this issue 8 years ago • 3 comments

Hello. Size attribute doesn't work. How can I change height of list? <select size="15" id='optgroup' multiple='multiple' >

zhukovsergei avatar Nov 16 '16 09:11 zhukovsergei

I've the same problem/question. What is the solution to change the height?

rgroothuis avatar Feb 19 '17 21:02 rgroothuis

Because of a hint on how to change the width I fount the trick to change the height as well.

In the mutli-select.css file, change the height parameter in the .ms-container .ms-list section to the height you want.

rgroothuis avatar Feb 19 '17 21:02 rgroothuis

To elaborate on @rgroothuis 's answer, here's how I found to solve this problem. Though I agree that the size should definitely be the support, rather than custom stuff.

I fixed this problem with the following:

HTML:

<select cssclass="custom-css-class" class="select-multiple-placement" multiple="multiple">
...
</select>

JS:

$('.select-multiple-placement').each((index, elem) => {
       $elem = $(elem);
       $elem.multiSelect({ cssClass: $elem.attr('cssclass') }) 
    });

CSS:

.custom-css-class.ms-container .ms-list {
    /* Custom Height here */
    height: 80px;
}

Fae-Bell avatar May 11 '17 20:05 Fae-Bell