Vue-multiselect: HTML templates

Created on 8 Aug 2016  路  4Comments  路  Source: shentao/vue-multiselect

Hello,

After pulling my hair with loads of libraries (Select2, Chosen, etc.), it's been a pleasure using vue-multiselect.

Me and some colleagues were wondering if there was something in the roadmap to integrate custom templates? For example if we had countries as options we would like to integrate a little flag next to the country name.

Regards, and nice work.

enhancement

Most helpful comment

Och well, couldn鈥檛 wait... 馃懟
@MaxHalford check out the 1.1.0 version: http://monterail.github.io/vue-multiselect/#partials

All 4 comments

Hey!
That鈥檚 really nice to hear, thanks!

It is actually in the roadmap hidden under the _Support for partials_ point, which would basically mean that one could just pass a _partial_ to compile using the components scope. This is different from how _slots_ work, in that slots are compiled using the parent鈥檚 scope.

Right now, you can accomplish this by creating a custom component (your own Multiselect.vue file that uses the provided mixins: multiselectMixin and pointerMixin). I understand that this isn鈥檛 the most efficient way to do small tweaks like just adding flags to the options list.

I will look into the _partials_ API and try to provide an update with support for it (~ this week probably).

However, before that happens I need to ship a beta version that supports Vue 2.0.

Cheers!

Och well, couldn鈥檛 wait... 馃懟
@MaxHalford check out the 1.1.0 version: http://monterail.github.io/vue-multiselect/#partials

You rock! :)

Thanks! There were some complications but the v1.1.1 should be stable. :) Glad I could help!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

volkanciloglu picture volkanciloglu  路  3Comments

hskrishna29 picture hskrishna29  路  3Comments

wujekbogdan picture wujekbogdan  路  4Comments

wujekbogdan picture wujekbogdan  路  4Comments

icebob picture icebob  路  4Comments