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

When data-size attribute is on, isDropup flag got wrong value

Open smiglu opened this issue 3 years ago • 2 comments

When select has a lot of option (in my case 100+) I wanted to limit it to display only the 6 options with scroll. I use attribute data-size set to 6. But when i click to open select, isDropup flag is set to true, and option show above a select but is enough space to display options below button.

probably problem is in line: estimate = liHeight * this.selectpicker.current.elements.length + menuPadding.vert;

proposition of fix that looks like it's working: if (this.options.size !== 'auto') { estimate = liHeight * this.options.size + menuPadding.vert; } else { estimate = liHeight * this.selectpicker.current.elements.length + menuPadding.vert; }

bootstrap-select ver. 1.13.14

smiglu avatar Aug 02 '22 12:08 smiglu

Would you care to make a PR?

NicolasCARPi avatar Aug 02 '22 13:08 NicolasCARPi

ok

smiglu avatar Aug 02 '22 14:08 smiglu