shentao / vue-multiselect

Universal select/multiselect/tagging component for Vue.js
https://vue-multiselect.js.org/
MIT License
6.67k stars 989 forks source link

:option-height not working #1618

Closed KuSai18 closed 1 year ago

KuSai18 commented 1 year ago

Hi All,

After testing on jsfiddle.net, :option-height:"104" was not apply the height to each option template.

Please help for this issue.

Regards, Carl

akki-jat commented 1 year ago

@KuSai18 option-height prop is not used for setting height of options, its used for calculating proper option height for keyboard navigation.

From documentation (https://vue-multiselect.js.org/#sub-custom-option-template): To ensure the keyboard navigation works properly, remember to set the :option-height so it equals the height of the option template. By default, the component assumes an option height of 40px.

Option height is determined based on the option's content, if you want to update that please do it from the css override.

KuSai18 commented 1 year ago

@akki-jat found out the problem now, thanks for your help.